<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>"[libc++] Try again LWG3233 Broken requirements for shared_ptr converting constructors" (#96103)</title>
<updated>2024-06-26T06:47:39+00:00</updated>
<author>
<name>Hui</name>
<email>hui.xie1990@gmail.com</email>
</author>
<published>2024-06-26T06:47:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eaae63d8e1430179f94c3bf8e2025067c3ff5975'/>
<id>eaae63d8e1430179f94c3bf8e2025067c3ff5975</id>
<content type='text'>
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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] fix `shared_ptr`'s incorrect constraints</title>
<updated>2023-02-11T19:44:38+00:00</updated>
<author>
<name>Hui</name>
<email>hui.xie0621@gmail.com</email>
</author>
<published>2023-02-05T19:31:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a38a4654ce4b1d2ae8a03797d2e520e415150492'/>
<id>a38a4654ce4b1d2ae8a03797d2e520e415150492</id>
<content type='text'>
Fix several bugs:
1. https://llvm.org/PR60258
   The conversion constructors' constraint `__compatible_with` incorrectly allow array types conversion to scalar types
2. https://llvm.org/PR53368
   The constructor that takes `unique_ptr` are not suffiently constrained.
3. The constructors that take raw pointers incorretly use `__compatible_with`. They have different constraints

Differential Revision: https://reviews.llvm.org/D143346
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix several bugs:
1. https://llvm.org/PR60258
   The conversion constructors' constraint `__compatible_with` incorrectly allow array types conversion to scalar types
2. https://llvm.org/PR53368
   The constructor that takes `unique_ptr` are not suffiently constrained.
3. The constructors that take raw pointers incorretly use `__compatible_with`. They have different constraints

Differential Revision: https://reviews.llvm.org/D143346
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Add test coverage for std::shared_ptr&lt;const T&gt;</title>
<updated>2022-03-10T13:49:31+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2022-03-09T22:06:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6b9e0af8db2a9e2344d52d2de46efd367725a856'/>
<id>6b9e0af8db2a9e2344d52d2de46efd367725a856</id>
<content type='text'>
Those tests were extracted from D120996.

Differential Revision: https://reviews.llvm.org/D121340
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Those tests were extracted from D120996.

Differential Revision: https://reviews.llvm.org/D121340
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[libc++] Remove extension to support allocator&lt;const T&gt;"</title>
<updated>2022-03-09T22:04:18+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2022-03-09T21:59:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a54d028895c91da356a4aaf30e27a5a5b90dd313'/>
<id>a54d028895c91da356a4aaf30e27a5a5b90dd313</id>
<content type='text'>
This reverts commit 276ca873. That commit has quite a history at this
point. It was first landed in dbc647643577, which broke std::shared_ptr&lt;T const&gt;
and was reverted in 9138666f5. It was then re-applied in 276ca873, with
the std::shared_ptr issue fixed, but it caused widespread breakage at
Google (which suggests it would cause similar breakage in the wild too),
so now I'm reverting again.

Instead, I will add a escape hatch that vendors can turn on to enable
the extension and perform a phased transition over one or two releases
like we sometimes do when things become non-trivial.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 276ca873. That commit has quite a history at this
point. It was first landed in dbc647643577, which broke std::shared_ptr&lt;T const&gt;
and was reverted in 9138666f5. It was then re-applied in 276ca873, with
the std::shared_ptr issue fixed, but it caused widespread breakage at
Google (which suggests it would cause similar breakage in the wild too),
so now I'm reverting again.

Instead, I will add a escape hatch that vendors can turn on to enable
the extension and perform a phased transition over one or two releases
like we sometimes do when things become non-trivial.
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Remove extension to support allocator&lt;const T&gt;</title>
<updated>2022-03-08T20:05:12+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2022-03-04T14:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=276ca87382b8f16a65bddac700202924228982f6'/>
<id>276ca87382b8f16a65bddac700202924228982f6</id>
<content type='text'>
This extension is a portability trap for users, since no other standard
library supports it. Furthermore, the Standard explicitly allows
implementations to reject std::allocator&lt;cv T&gt;, so allowing it is
really going against the current.

This was discovered in D120684: this extension required `const_cast`ing
in `__construct_range_forward`, a fishy bit of code that can be removed
if we don't support the extension anymore.

This is a re-application of dbc647643577, which was reverted in 9138666f5
because it broke std::shared_ptr&lt;T const&gt;. Tests have now been added and
we've made sure that std::shared_ptr&lt;T const&gt; wouldn't be broken in this
version.

Differential Revision: https://reviews.llvm.org/D120996
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This extension is a portability trap for users, since no other standard
library supports it. Furthermore, the Standard explicitly allows
implementations to reject std::allocator&lt;cv T&gt;, so allowing it is
really going against the current.

This was discovered in D120684: this extension required `const_cast`ing
in `__construct_range_forward`, a fishy bit of code that can be removed
if we don't support the extension anymore.

This is a re-application of dbc647643577, which was reverted in 9138666f5
because it broke std::shared_ptr&lt;T const&gt;. Tests have now been added and
we've made sure that std::shared_ptr&lt;T const&gt; wouldn't be broken in this
version.

Differential Revision: https://reviews.llvm.org/D120996
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] [test] Add tests for converting array types in shared_ptr.</title>
<updated>2021-10-19T17:03:51+00:00</updated>
<author>
<name>Konstantin Varlamov</name>
<email>varconst@apple.com</email>
</author>
<published>2021-10-19T17:02:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b84da5ba6e31e9e264370ac2b47536a7b50ef4fd'/>
<id>b84da5ba6e31e9e264370ac2b47536a7b50ef4fd</id>
<content type='text'>
The only possible kind of a conversion in initialization of a shared
pointer to an array is a qualification conversion (i.e., adding
cv-qualifiers). This patch adds tests for converting from `A[]` to
`const A[]` to the following functions:

```
template&lt;class Y&gt; explicit shared_ptr(Y* p);

template&lt;class Y&gt; shared_ptr(const shared_ptr&lt;Y&gt;&amp; r);
template&lt;class Y&gt; shared_ptr(shared_ptr&lt;Y&gt;&amp;&amp; r);

template&lt;class Y&gt; shared_ptr&amp; operator=(const shared_ptr&lt;Y&gt;&amp; r);
template&lt;class Y&gt; shared_ptr&amp; operator=(shared_ptr&lt;Y&gt;&amp;&amp; r);

template&lt;class Y&gt; void reset(Y* p);
template&lt;class Y, class D&gt; void reset(Y* p, D d);
template&lt;class Y, class D, class A&gt; void reset(Y* p, D d, A a);
```

Similar tests for converting functions that involve a `weak_ptr` should
be added once LWG issue [3001](https://cplusplus.github.io/LWG/issue3001)
is implemented.

Differential Revision: https://reviews.llvm.org/D112048
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only possible kind of a conversion in initialization of a shared
pointer to an array is a qualification conversion (i.e., adding
cv-qualifiers). This patch adds tests for converting from `A[]` to
`const A[]` to the following functions:

```
template&lt;class Y&gt; explicit shared_ptr(Y* p);

template&lt;class Y&gt; shared_ptr(const shared_ptr&lt;Y&gt;&amp; r);
template&lt;class Y&gt; shared_ptr(shared_ptr&lt;Y&gt;&amp;&amp; r);

template&lt;class Y&gt; shared_ptr&amp; operator=(const shared_ptr&lt;Y&gt;&amp; r);
template&lt;class Y&gt; shared_ptr&amp; operator=(shared_ptr&lt;Y&gt;&amp;&amp; r);

template&lt;class Y&gt; void reset(Y* p);
template&lt;class Y, class D&gt; void reset(Y* p, D d);
template&lt;class Y, class D, class A&gt; void reset(Y* p, D d, A a);
```

Similar tests for converting functions that involve a `weak_ptr` should
be added once LWG issue [3001](https://cplusplus.github.io/LWG/issue3001)
is implemented.

Differential Revision: https://reviews.llvm.org/D112048
</pre>
</div>
</content>
</entry>
<entry>
<title>[libcxx] Re-commit: shared_ptr changes from library fundamentals (P0414R2).</title>
<updated>2020-05-12T18:23:18+00:00</updated>
<author>
<name>zoecarver</name>
<email>z.zoelec2@gmail.com</email>
</author>
<published>2020-05-12T01:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ce195fb22b542c20745e3ed46d1516e8b4e3a76f'/>
<id>ce195fb22b542c20745e3ed46d1516e8b4e3a76f</id>
<content type='text'>
Implements P0414R2:
  * Adds support for array types in std::shared_ptr.
  * Adds reinterpret_pointer_cast for shared_ptr.

Re-committing now that the leaking tests are fixed.

Differential Revision: https://reviews.llvm.org/D62259
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implements P0414R2:
  * Adds support for array types in std::shared_ptr.
  * Adds reinterpret_pointer_cast for shared_ptr.

Re-committing now that the leaking tests are fixed.

Differential Revision: https://reviews.llvm.org/D62259
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[libcxx] shared_ptr changes from library fundamentals (P0414R2)."</title>
<updated>2020-05-12T05:43:17+00:00</updated>
<author>
<name>zoecarver</name>
<email>z.zoelec2@gmail.com</email>
</author>
<published>2020-05-12T05:42:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5eb55483ebd183985e6f397491ac822304e3a893'/>
<id>5eb55483ebd183985e6f397491ac822304e3a893</id>
<content type='text'>
This reverts commit e8c13c182a562f45287d6b8da612264d09027087.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit e8c13c182a562f45287d6b8da612264d09027087.
</pre>
</div>
</content>
</entry>
<entry>
<title>[libcxx] shared_ptr changes from library fundamentals (P0414R2).</title>
<updated>2020-05-12T01:46:29+00:00</updated>
<author>
<name>zoecarver</name>
<email>z.zoelec2@gmail.com</email>
</author>
<published>2020-05-12T01:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e8c13c182a562f45287d6b8da612264d09027087'/>
<id>e8c13c182a562f45287d6b8da612264d09027087</id>
<content type='text'>
Implements P0414R2:
  * Adds support for array types in std::shared_ptr.
  * Adds reinterpret_pointer_cast for shared_ptr.

Differential Revision: https://reviews.llvm.org/D62259
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implements P0414R2:
  * Adds support for array types in std::shared_ptr.
  * Adds reinterpret_pointer_cast for shared_ptr.

Differential Revision: https://reviews.llvm.org/D62259
</pre>
</div>
</content>
</entry>
<entry>
<title>Add include for 'test_macros.h' to all the tests that were missing them. Thanks to Zoe for the (big, but simple) patch. NFC intended.</title>
<updated>2019-05-31T18:35:30+00:00</updated>
<author>
<name>Marshall Clow</name>
<email>mclow.lists@gmail.com</email>
</author>
<published>2019-05-31T18:35:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7fc6a55688c816f5fc1a5481ae7af25be7500356'/>
<id>7fc6a55688c816f5fc1a5481ae7af25be7500356</id>
<content type='text'>
llvm-svn: 362252
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 362252
</pre>
</div>
</content>
</entry>
</feed>
