Skip to content

Commit c38e5a0

Browse files
committed
use gsl::span for now in the VLA return
1 parent e6628f3 commit c38e5a0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Framework/Core/include/Framework/ASoA.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ class ColumnIterator : ChunkingPolicy
575575
auto list = std::static_pointer_cast<arrow::ListArray>(mColumn->chunk(mCurrentChunk));
576576
auto offset = list->value_offset(*mCurrentPos - mFirstIndex);
577577
auto length = list->value_length(*mCurrentPos - mFirstIndex);
578-
return std::span<unwrap_t<T> const>{mCurrent + mFirstIndex + offset, mCurrent + mFirstIndex + (offset + length)};
578+
return gsl::span<unwrap_t<T> const>{mCurrent + mFirstIndex + offset, mCurrent + mFirstIndex + (offset + length)};
579579
}
580580

581581
decltype(auto) operator*() const
@@ -2556,12 +2556,12 @@ consteval auto getIndexTargets()
25562556
_Name_##Ids(_Name_##Ids const& other) = default; \
25572557
_Name_##Ids& operator=(_Name_##Ids const& other) = default; \
25582558
\
2559-
std::span<const _Type_> inline getIds() const \
2559+
gsl::span<const _Type_> inline getIds() const \
25602560
{ \
25612561
return _Getter_##Ids(); \
25622562
} \
25632563
\
2564-
std::span<const _Type_> _Getter_##Ids() const \
2564+
gsl::span<const _Type_> _Getter_##Ids() const \
25652565
{ \
25662566
return *mColumnIterator; \
25672567
} \
@@ -2915,12 +2915,12 @@ consteval auto getIndexTargets()
29152915
_Name_##Ids() = default; \
29162916
_Name_##Ids(_Name_##Ids const& other) = default; \
29172917
_Name_##Ids& operator=(_Name_##Ids const& other) = default; \
2918-
std::span<const _Type_> inline getIds() const \
2918+
gsl::span<const _Type_> inline getIds() const \
29192919
{ \
29202920
return _Getter_##Ids(); \
29212921
} \
29222922
\
2923-
std::span<const _Type_> _Getter_##Ids() const \
2923+
gsl::span<const _Type_> _Getter_##Ids() const \
29242924
{ \
29252925
return *mColumnIterator; \
29262926
} \

Framework/Core/test/test_ASoA.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,8 +1150,8 @@ TEST_CASE("TestListColumns")
11501150
for (auto& row : tbl) {
11511151
auto f = row.l1();
11521152
auto i = row.l2();
1153-
auto constexpr bf = std::same_as<decltype(f), std::span<const float, (size_t)-1>>;
1154-
auto constexpr bi = std::same_as<decltype(i), std::span<const int, (size_t)-1>>;
1153+
auto constexpr bf = std::same_as<decltype(f), gsl::span<const float, (size_t)-1>>;
1154+
auto constexpr bi = std::same_as<decltype(i), gsl::span<const int, (size_t)-1>>;
11551155
REQUIRE(bf);
11561156
REQUIRE(bi);
11571157
REQUIRE(f.size() == s);

0 commit comments

Comments
 (0)