Title
optional::value_type is not always a value type
Status
open
Section
[optional.optional]
Submitter
Casey Carter

Created on 2017-06-27.00:00:00 last changed 82 months ago

Messages

Date: 2018-01-28.19:43:07

Proposed resolution:

This wording is relative to N4659.

  1. Edit [optional.optional], class template optional synopsis, as indicated:

    template <class T>
      class optional {
      public:
        using value_type = remove_cv_t<T>;
        […]
      };
    
Date: 2018-01-26.00:00:00

[ 2018-1-26 issues processing telecon ]

Status to 'Open'

Date: 2017-07-12.01:58:24

[ 2017-07 Toronto Tuesday PM issue prioritization ]

Priority 3; may also affect array

Date: 2017-06-27.00:00:00

optional<T>::value_type is T, which can be a cv-qualified object type. This is inconsistent with the uses of the name value_type elsewhere in the standard. We should either require optional<T>::value_type to be remove_cv_t<T> — a true value type — or rename the type alias to element_type.

History
Date User Action Args
2018-01-28 19:43:07adminsetmessages: + msg9655
2018-01-28 19:43:07adminsetstatus: new -> open
2017-07-12 01:58:24adminsetmessages: + msg9353
2017-06-27 19:13:39adminsetmessages: + msg9299
2017-06-27 00:00:00admincreate