[PATCH] D57058: Implement LWG3101 - span's Container constructors need another constraint
Marshall Clow via Phabricator
reviews at reviews.llvm.org
Tue Jan 22 11:07:47 PST 2019
mclow.lists marked 2 inline comments as done.
mclow.lists 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>'}}
----------------
ldionne wrote:
> Why does this fail? Shouldn't this use `std::span<int, std::dynamic_extent>::span(Container const&)`?
Because it's an rvalue? Dunno; but if so, that makes all the other tests useless. I will investigate.
================
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>'}}
}
----------------
ldionne wrote:
> 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.
Correct. I removed all the different combinations of const/non-const etc because I removed the ctor, and left a single test behind to make sure that the ctor is not found.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57058/new/
https://reviews.llvm.org/D57058
More information about the libcxx-commits
mailing list