Skip to content

Commit

Permalink
Add workaround for Clang 16 bug
Browse files Browse the repository at this point in the history
Already fixed for Clang 17
Repro: https://godbolt.org/z/shfq7TPEx
  • Loading branch information
JMazurkiewicz committed May 16, 2023
1 parent 25de978 commit c17f6a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stl/inc/mdspan
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ private:
template <class _OtherIndexType, size_t... _Seq>
_NODISCARD constexpr reference _Index_impl(span<_OtherIndexType, rank()> _Indices, index_sequence<_Seq...>) const {
#ifdef __clang__ // TRANSITION, P2128R6
return (*this)[_STD as_const(_Indices[_Seq])...];
return this->operator[](_STD as_const(_Indices[_Seq])...);
#else // ^^^ defined(__clang__) / !defined(__clang__) vvv
return _Acc.access(_Ptr, static_cast<size_t>(_Map(static_cast<index_type>(_STD as_const(_Indices[_Seq]))...)));
#endif // ^^^ !defined(__clang__) ^^^
Expand Down

0 comments on commit c17f6a3

Please sign in to comment.