This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD Concepts status.

1026. Smart pointers need to be concept-constrained templates

Section: 23.10 [memory] Status: NAD Concepts Submitter: Alisdair Meredith Opened: 2009-03-11 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [memory].

View all issues with NAD Concepts status.


Addresses UK 209 [CD1]

Smart pointers cannot be used in constrained templates.

[ Summit: ]

We look forward to a paper on this topic. We recommend no action until a paper is available. We understand that a paper is forthcoming.

[ Peter Dimov adds: ]

shared_ptr<T> and weak_ptr<T> support all types T for which T* is valid. In other words, a possible (partial) resolution is to change class T to PointeeType T for shared_ptr, weak_ptr and possibly enable_shared_from_this.

Proposed resolution: