[libcxx-commits] [libcxx] 499e135 - [libc++][test] Do not test Clang bug in `is_constructible.pass.cpp` (#105964)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 26 07:08:58 PDT 2024
Author: S. B. Tam
Date: 2024-08-26T10:08:52-04:00
New Revision: 499e13514aaf2efdcd85520ade791ed635502adb
URL: https://github.com/llvm/llvm-project/commit/499e13514aaf2efdcd85520ade791ed635502adb
DIFF: https://github.com/llvm/llvm-project/commit/499e13514aaf2efdcd85520ade791ed635502adb.diff
LOG: [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.
Added:
Modified:
libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
index 578efb90f7f1ab..9a5efe7b5fe32f 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
@@ -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, "");
More information about the libcxx-commits
mailing list