This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.
Section: 22.7.4 [any.class] Status: C++17 Submitter: Jonathan Wakely Opened: 2016-11-09 Last modified: 2017-07-30
View all other issues in [any.class].
View all issues with C++17 status.
Addresses US 29What does it mean for (the contained) objects to be "equivalent"? Suggested resolution: Add definition (note that using operator==() involves complicated questions of overload resolution).
[2016-11-08, Jonathan comments and suggests wording]
We can rephrase the copy constructor in terms of equivalence to construction from the contained object. We need to use in-place construction to avoid recursion in the case where the contained object is itself an any.For the move constructor we don't simply want to construct from the contrained object, because when the contained object is stored in dynamic memory we don't actually construct anything, we just transfer ownership of a pointer.
[Issues Telecon 16-Dec-2016]
Move to Tentatively Ready
This wording is relative to N4606.
Change [any.cons] p2:
any(const any& other);
Constructs an object of type any with an equivalent state as other.
Change [any.cons] p4:
Constructs an object of type any with a state equivalent to the original state of other.