[PATCH] D57058: Implement LWG3101 - span's Container constructors need another constraint
Louis Dionne via Phabricator
reviews at reviews.llvm.org
Tue Jan 22 08:41:32 PST 2019
ldionne added inline comments.
================
Comment at: test/std/containers/views/span.cons/container.fail.cpp:72
{
std::span<int> s1{IsAContainer<int>()}; // expected-error {{no matching constructor for initialization of 'std::span<int>'}}
std::span<int> s3{NotAContainerNoData<int>()}; // expected-error {{no matching constructor for initialization of 'std::span<int>'}}
----------------
Why does this fail? Shouldn't this use `std::span<int, std::dynamic_extent>::span(Container const&)`?
================
Comment at: test/std/containers/views/span.cons/container.fail.cpp:100
+// statically sized
+ std::span<int,1> s1{IsAContainer<int>()}; // expected-error {{no matching constructor for initialization of 'std::span<int, 1>'}}
}
----------------
Just to make sure I understand -- this is the only test that checks the actual changes in LWG3101, i.e. the removal of support for constructing a statically-sized `std::span` from a dynamically-sized `std::span`. Other changes just remove tests that shouldn't be passing (or don't make sense) anymore.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57058/new/
https://reviews.llvm.org/D57058
More information about the libcxx-commits
mailing list