I have been playing around with the latest specification for std::span
using the clang trunk and libc++ on Godbolt and find some of the constructors confusing.
In particular I find the constructors from a plain old array and and a std::array
to be different from other containers.
For example the following code appears to compile:
std::vector<int*> v = {nullptr, nullptr};
std::span<const int* const> s{v};
However this does not:
std::array<int*, 2> a = {nullptr, nullptr};
std::span<const int* const> s{a};
This seems to be in keeping with the way the constructors are described on cppreference.com, I am just struggling to understand why this is the case. Can anybody shed any light?