Date
2021-06-14.14:09:34
Message id
11930

Content

Proposed resolution:

This wording is relative to N4885.

  1. Modify [optional.syn], header <optional> synopsis, as indicated:

    […]
    
    // [optional.nullopt], no-value state indicator
    struct nullopt_t{see below explicit nullopt_t() = default; };
    inline constexpr nullopt_t nullopt{}(unspecified);
    
    […]
    
  2. Modify [optional.nullopt] as indicated:

    struct nullopt_t{see below explicit nullopt_t() = default; };
    inline constexpr nullopt_t nullopt{}(unspecified);
    

    -1- The struct nullopt_t is an empty class type used as a unique type to indicate the state of not containing a value for optional objects. In particular, optional<T> has a constructor with nullopt_t as a single argument; this indicates that an optional object not containing a value shall be constructed.

    -2- Type nullopt_t shall not have a default constructor or an initializer-list constructor, and shall not be an aggregate.