diff options
| author | Hui <hui.xie1990@gmail.com> | 2024-06-26 07:47:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-26 07:47:39 +0100 |
| commit | eaae63d8e1430179f94c3bf8e2025067c3ff5975 (patch) | |
| tree | 7ec91a2a8382e4bb44de9fde236c4e9895eb10dc /libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp | |
| parent | 20683de70e43fa73536ac1e8ce4082604048d040 (diff) | |
"[libc++] Try again LWG3233 Broken requirements for shared_ptr converting constructors" (#96103)
Try it again. Use the approach suggested by Tim in the LWG thread :
using function default argument SFINAE
- Revert "[libc++] Revert LWG3233 Broken requirements for shared_ptr
converting constructors (#93071)"
- Revert "[libc++] Revert temporary attempt to implement LWG 4110
(#95263)"
- test for default_delete
- Revert "Revert "[libc++] Revert temporary attempt to implement LWG
4110 (#95263)""
- test for NULL
Diffstat (limited to 'libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp')
| -rw-r--r-- | libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp index 87b0cbde14a3..37ce087ca7ba 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp @@ -27,12 +27,12 @@ struct A int A::count = 0; -struct Derived : A {}; +struct derived : A {}; // https://llvm.org/PR60258 // Invalid constructor SFINAE for std::shared_ptr's array ctors static_assert( std::is_constructible<std::shared_ptr<int>, int*>::value, ""); -static_assert( std::is_constructible<std::shared_ptr<A>, Derived*>::value, ""); +static_assert( std::is_constructible<std::shared_ptr<A>, derived*>::value, ""); static_assert(!std::is_constructible<std::shared_ptr<A>, int*>::value, ""); #if TEST_STD_VER >= 17 @@ -99,7 +99,7 @@ int main(int, char**) { assert(A::count == 0); - std::shared_ptr<A> pA(new Derived); + std::shared_ptr<A> pA(new derived); assert(pA.use_count() == 1); assert(A::count == 1); } |
