[libc++][test] Do not test Clang bug in is_constructible.pass.cpp (#105964)

A comment in `is_constructible.pass.cpp` suggests that Clang is
non-conforming in accepting construction of `const int&` from
`ExplicitTo<int&&>`.

This PR changes the test to expect the standard-conforming behavior,
which makes the test pass on MSVC.
This commit is contained in:
S. B. Tam 2024-08-26 22:08:52 +08:00 committed by GitHub
parent b8f134faba
commit 499e13514a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -228,8 +228,8 @@ int main(int, char**)
// But the rvalue to lvalue reference binding isn't allowed according to
// [over.match.ref] despite Clang accepting it.
test_is_constructible<int&, ExplicitTo<int&>>();
#ifndef TEST_COMPILER_GCC
test_is_constructible<const int&, ExplicitTo<int&&>>();
#ifndef TEST_COMPILER_CLANG
test_is_not_constructible<const int&, ExplicitTo<int&&>>();
#endif
static_assert(std::is_constructible<int&&, ExplicitTo<int&&>>::value, "");