std::any
does not mention allocationSection: 22.7.4 [any.class] Status: New Submitter: Thomas Köppe Opened: 2020-03-04 Last modified: 2020-04-04
Priority: 3
View all other issues in [any.class].
View all issues with New status.
Discussion:
Several of the function specifications in 22.7.4 [any.class] have Throws: elements,
but those only mention "exceptions thrown by a constructor". It seems necessary for std::any
to perform dynamic allocation in general, and so in general there should be a possibility of an
exception raised by such dynamic allocation. (This may come from a user-provided
T::operator new
, as far as I can tell.)
any(const any& other)
template<class T> any(T&& value)
both any(in_place_t<T>, …)
overloads
any& operator=(const any& rhs)
template<class T> any& operator=(T&& rhs)
all emplace
overloads
[2020-04-04 Issue Prioritization]
Priority to 3 after reflector discussion.
Proposed resolution: