[libcxx-dev] test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp

Casey Carter via libcxx-dev libcxx-dev at lists.llvm.org
Tue Oct 8 19:16:01 PDT 2019


The subject test includes this function:

void test_for_non_eager_instantiation() {
    // Ensure we don't accidentally instantiate `std::basic_string<Nonsense>`
    // since it may not be well formed and can cause an error in the
    // non-immediate context.
    static_assert(!std::is_constructible<std::bitset<3>, Nonsense*>::value, "");
    static_assert(!std::is_constructible<std::bitset<3>, Nonsense*,
size_t, Nonsense&, Nonsense&>::value, "");
}


which requires nonstandard behavior. Should these assertions be
libc++-specific? (Should someone file an LWG issue to standardize the
expected behavior?)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20191008/0138e183/attachment-0001.html>


More information about the libcxx-dev mailing list