Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use matching lld version and adjust tcb span tuple struct definitions #8168

Draft
wants to merge 4 commits into
base: dragonflight
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ jobs:
- compiler: clang++-7
os: ubuntu-20.04
packages: clang-7 lld-7
linker: lld-7
- compiler: clang++-15
os: ubuntu-22.04
packages: clang-15 lld-15
enable_file_prefix_map: true
linker: lld-15
exclude:
- compiler: clang++-7
cppVersion: 20
Expand All @@ -117,9 +119,10 @@ jobs:
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
-DCMAKE_CXX_FLAGS="-Og ${{ matrix.enable_file_prefix_map && format('-ffile-prefix-map={0}/=/', runner.workspace) || ''}}
${{ format('-fdebug-prefix-map={0}/=/', runner.workspace) || ''}}
-fno-omit-frame-pointer -fsanitize=address,undefined
-fsanitize-undefined-strip-path-components=$UBSAN_STRIP_COUNT"
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld -fsanitize=address,undefined"
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=${{ matrix.linker }} -fsanitize=address,undefined"
-DCMAKE_CXX_STANDARD=${{ matrix.cppVersion }}
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache

Expand Down
6 changes: 3 additions & 3 deletions engine/lib/tcb/span.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,15 +609,15 @@ constexpr auto get(span<E, S> s) -> decltype(s[N])
namespace std {

template <typename ElementType, size_t Extent>
class tuple_size<TCB_SPAN_NAMESPACE_NAME::span<ElementType, Extent>>
struct tuple_size<TCB_SPAN_NAMESPACE_NAME::span<ElementType, Extent>>
: public integral_constant<size_t, Extent> {};

template <typename ElementType>
class tuple_size<TCB_SPAN_NAMESPACE_NAME::span<
struct tuple_size<TCB_SPAN_NAMESPACE_NAME::span<
ElementType, TCB_SPAN_NAMESPACE_NAME::dynamic_extent>>; // not defined

template <size_t I, typename ElementType, size_t Extent>
class tuple_element<I, TCB_SPAN_NAMESPACE_NAME::span<ElementType, Extent>> {
struct tuple_element<I, TCB_SPAN_NAMESPACE_NAME::span<ElementType, Extent>> {
public:
static_assert(Extent != TCB_SPAN_NAMESPACE_NAME::dynamic_extent &&
I < Extent,
Expand Down