This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
std::span new initializer_list constructorSection: 23.7.2.2.2 [span.cons] Status: New Submitter: Michael Schellenberger Costa Opened: 2026-02-10 Last modified: 2026-02-11
Priority: Not Prioritized
View other active issues in [span.cons].
View all other issues in [span.cons].
View all issues with New status.
Discussion:
NVIDIA C++ standard library libcu++ received a bug report
against our span implementation.
initializer_list
constructor of span in conjunction with a bad conversion sequence.
The code in question is:
#include <span>
int main() {
bool data[4] = {true, false, true, false};
bool* ptr = data;
size_t size = 4;
::std::span<const bool> bad_span{ptr, size};
return 0;
}
The issue is that the compiler tries a conversion sequence from bool* to bool and
size_t to bool.
bool by that constructor.
Proposed resolution: