2817. std::hash for nullptr_t

Section: 23.14.15 [unord.hash] Status: Resolved Submitter: Marshall Clow Opened: 2016-11-10 Last modified: 2016-11-28

Priority: Not Prioritized

View other active issues in [unord.hash].

View all other issues in [unord.hash].

View all issues with Resolved status.

Discussion:

In the list of types that the library provides std::hash specializations, there is an entry for hash<T*>, but none entry for hash<nullptr_t>.

[2016-11-13, Daniel provides wording]

[2016-11-28]

Resolved by P0513R0

Proposed resolution:

This wording is relative to N4606.

  1. Change 23.14 [function.objects], header <functional> synopsis, as indicated:

    […]
    
    // Hash function specializations
    template <> struct hash<bool>;
    […]
    template <> struct hash<long double>;
    template <> struct hash<nullptr_t>;
    
    template<class T> struct hash<T*>;
    […]
    
  2. Change 23.14.15 [unord.hash] before p2, as indicated:

    template <> struct hash<bool>;
    […]
    template <> struct hash<long double>;
    template <> struct hash<nullptr_t>;
    template<class T> struct hash<T*>;