Title
Type traits and std::nullptr_t
Status
c++14
Section
[meta.unary.cat]
Submitter
Joe Gottman

Created on 2013-03-15.00:00:00 last changed 123 months ago

Messages

Date: 2013-09-29.10:27:09

Proposed resolution:

This wording is relative to N3485.

  1. Edit [meta.type.synop], header <type_traits> synopsis:

    namespace std {
      […]
      // 20.9.4.1, primary type categories:
      template <class T> struct is_void;
      template <class T> struct is_null_pointer;
      template <class T> struct is_integral;
      template <class T> struct is_floating_point;
      […]
    }
    
  2. Edit Table 47 — "Primary type category predicates" as indicated:

    Table 47 — Primary type category predicates
    Template Condition Comments
    template <class T>
    struct is_null_pointer;
    T is std::nullptr_t ([basic.fundamental])  
Date: 2013-09-15.00:00:00

[ 2013-09-29, Chicago ]

Apply to the Working Paper

Date: 2013-04-15.00:00:00

[ 2013-04-20, Bristol ]

Rename to is_null_pointer, move to Ready

Previous wording:

This wording is relative to N3485.

  1. Edit [meta.type.synop], header <type_traits> synopsis:

    namespace std {
      […]
      // 20.9.4.1, primary type categories:
      template <class T> struct is_void;
      template <class T> struct is_nullptr;
      template <class T> struct is_integral;
      template <class T> struct is_floating_point;
      […]
    }
    
  2. Edit Table 47 — "Primary type category predicates" as indicated:

    Table 47 — Primary type category predicates
    Template Condition Comments
    template <class T>
    struct is_nullptr;
    T is std::nullptr_t ([basic.fundamental])  
Date: 2013-03-15.00:00:00

According to [meta.unary.cat], for every type T, exactly one of the primary type traits is true. So which is true for the type std::nullptr_t? By [lex.nullptr] std::nullptr_t is not a pointer type or a pointer-to-member type, so is_pointer, is_member_object_pointer and is_member_function_pointer can't be true for std::nullptr_t, and none of the other primary type traits seem to apply.

History
Date User Action Args
2014-02-20 13:20:35adminsetstatus: wp -> c++14
2013-09-29 10:27:09adminsetmessages: + msg6654
2013-09-29 10:27:09adminsetstatus: voting -> wp
2013-09-23 13:24:31adminsetstatus: ready -> voting
2013-04-20 08:17:49adminsetmessages: + msg6498
2013-04-20 08:17:49adminsetstatus: new -> ready
2013-03-17 22:52:52adminsetmessages: + msg6401
2013-03-15 00:00:00admincreate