This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD Editorial status.
Section: 99 [auto.ptr] Status: NAD Editorial Submitter: Maarten Hilferink Opened: 2009-01-21 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [auto.ptr].
View all issues with NAD Editorial status.
Discussion:
I think that the Note of 99 [auto.ptr], paragraph 3 needs a rewrite
since "Assignable" is no longer defined as a concept.
The relationship of auto_ptr with the new CopyAssignable, MoveAssignable,
and MoveConstructible concepts should be clarified.
Furthermore, since the use of auto_ptr is depreciated anyway,
we can also omit a description of its intended use.
[ Batavia (2009-05): ]
We agree with the intent of the proposed resolution. Move to NAD Editorial.
Proposed resolution:
Change 99 [auto.ptr], paragraph 3:
The
Instances ofauto_ptrprovides a semantics of strict ownership. Anauto_ptrowns the ob ject it holds a pointer to. Copying anauto_ptrcopies the pointer and transfers ownership to the destination. If more than oneauto_ptrowns the same ob ject at the same time the behavior of the program is undefined. [Note: The uses ofauto_ptrinclude providing temporary exception-safety for dynamically allocated memory, passing ownership of dynamically allocated memory to a function, and returning dynamically allocated memory from a function.auto_ptrdoes not meet theCopyConstructibleandAssignablerequirements for standard library container elements and thus instantiating a standard library container with anauto_ptrresults in undefined behavior.auto_ptrshall meet theMoveConstructibleandMoveAssignablerequirements, but do not meet theCopyConstructibleandCopyAssignablerequirements. -- end note]