You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[libc++] Tweak how we check constraints on shared_ptr(nullptr_t) (llvm#94996)
This avoids breaking code that should arguably be valid but technically
isn't after enforcing the constraints on shared_ptr's constructors. A
new LWG issue was filed to fix this in the Standard.
This patch applies the expected resolution of this issue to avoid
flip-flopping users whose code should always be considered valid.
See llvm#93071 for more context.
Copy file name to clipboardExpand all lines: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter.pass.cpp
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -32,17 +32,16 @@ int A::count = 0;
32
32
// LWG 3233. Broken requirements for shared_ptr converting constructors
Copy file name to clipboardExpand all lines: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/nullptr_t_deleter_allocator.pass.cpp
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -33,17 +33,21 @@ int A::count = 0;
33
33
// LWG 3233. Broken requirements for shared_ptr converting constructors
Copy file name to clipboardExpand all lines: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,14 @@ int main(int, char**)
115
115
}
116
116
#endif// TEST_STD_VER >= 11
117
117
118
+
#if TEST_STD_VER >= 14
119
+
{
120
+
// See https://github.com/llvm/llvm-project/pull/93071#issuecomment-2158494851
121
+
auto deleter = [](auto pointer) { delete pointer; };
Copy file name to clipboardExpand all lines: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -165,5 +165,13 @@ int main(int, char**)
165
165
test_allocator<Derived[4]> >::value, "");
166
166
}
167
167
168
+
#if TEST_STD_VER >= 14
169
+
{
170
+
// See https://github.com/llvm/llvm-project/pull/93071#issuecomment-2158494851
171
+
auto deleter = [](auto pointer) { delete pointer; };
0 commit comments