This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TS status.
Section: 8.2.1 [fund.ts.v2::memory.smartptr.shared] Status: TS Submitter: Tim Song Opened: 2015-12-13 Last modified: 2017-08-01
View all issues with TS status.
The library fundamentals TS does not provide a separate specification for std::hash<std::experimental::shared_ptr<T>>, deferring to the C++14 specification in §22.214.171.124/3:
template <class T> struct hash<shared_ptr<T> >;
-3- The template specialization shall meet the requirements of class template hash (20.9.13). For an object p of type shared_ptr<T>, hash<shared_ptr<T> >()(p) shall evaluate to the same value as hash<T*>()(p.get()).
That specification doesn't work if T is an array type (U[N] or U), as in this case get() returns U*, which cannot be hashed by std::hash<T*>.
This wording is relative to N4562.
Insert a new subclause after 126.96.36.199 [fund.ts.v2::memory.smartptr.shared.cast]:
[Note for the editor: The synopses in [header.memory.synop] and [memory.smartptr.shared] should be updated to refer to the new subclause rather than C++14 §188.8.131.52]