You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accessor functions for std::array<T,0> aren't constexpr.
This means that std::array can not be used in a constexpr context if its, for example, used to initialize a span, which might or might not be empty depending on other compile time evaluated factors.
Description
Accessor functions for std::array<T,0> aren't constexpr.
This means that std::array can not be used in a constexpr context if its, for example, used to initialize a span, which might or might not be empty depending on other compile time evaluated factors.
Current implementation:
_LIBCPP_INLINE_VISIBILITY value_type* data() _NOEXCEPT {return reinterpret_cast<value_type*>(__elems_);} _LIBCPP_INLINE_VISIBILITY const value_type* data() const _NOEXCEPT {return reinterpret_cast<const value_type*>(__elems_);}
Fixed in LLV since version 11:
https://github.com/llvm/llvm-project/blob/release/11.x/libcxx/include/array
The text was updated successfully, but these errors were encountered: