[libcxx-commits] [libcxx] [libc++][test] Do not test Clang bug in `is_constructible.pass.cpp` (PR #105964)
S. B. Tam via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Aug 24 18:34:14 PDT 2024
https://github.com/cpplearner created https://github.com/llvm/llvm-project/pull/105964
A comment in `is_constructible.pass.cpp` suggests that Clang is non-conforming in accepting construction of `const int&` from `ExplicitTo<int&&>`.
https://github.com/llvm/llvm-project/blob/3ef64f7ab5b8651eab500cd944984379fce5f639/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp#L225-L229
This PR changes the test to expect the standard-conforming behavior, which makes the test pass on MSVC.
>From dd64b93430c85774b8505ba772dd753b8ebc5a87 Mon Sep 17 00:00:00 2001
From: "S. B. Tam" <cpplearner at outlook.com>
Date: Sun, 25 Aug 2024 09:26:31 +0800
Subject: [PATCH] [libc++][test] Do not test Clang bug in
`is_constructible.pass.cpp`
---
.../meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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..9f1bb50e76dc97 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 __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