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
NOTE: This isn't something std::span in C++20 supports either, unfortunately. But since Boost tries to offer things a future standard might adopt, I think this fits?
Because boost::span has no constructor signature with a direct std::initializer_list argument, but only a templated "range" one, this works:
NOTE: This isn't something
std::span
in C++20 supports either, unfortunately. But since Boost tries to offer things a future standard might adopt, I think this fits?Because
boost::span
has no constructor signature with a directstd::initializer_list
argument, but only a templated "range" one, this works:but this does not, because it requires two implicit conversions to occur:
I believe the above would work if this were to be added:
I can provide a PR, if you wish.
I recognize this can lead to lifetime issues for the backing array, but that's already true for
span
regardless.There is a std proposal for this, I believe: p2447r2, but I don't know its disposition.
The text was updated successfully, but these errors were encountered: