Title
path::operator+=(single-character) misspecified
Status
c++20
Section
[fs.path.concat]
Submitter
Tim Song

Created on 2018-01-24.00:00:00 last changed 46 months ago

Messages

Date: 2019-02-21.17:23:36

Proposed resolution:

This wording is relative to N4762.

  1. Modify [fs.path.concat] as indicated:

    path& operator+=(const path& x);
    path& operator+=(const string_type& x);
    path& operator+=(basic_string_view<value_type> x);
    path& operator+=(const value_type* x);
    path& operator+=(value_type x);
    template<class Source>
      path& operator+=(const Source& x);
    template<class EcharT>
      path& operator+=(EcharT x);
    template<class Source>
      path& concat(const Source& x);
    

    -1- Effects: […]

    -2- Returns: *this.

    path& operator+=(value_type x);
    template<class EcharT>
      path& operator+=(EcharT x);
    

    -?- Effects: Equivalent to: return *this += basic_string_view(&x, 1);

Date: 2019-02-21.17:23:36

[ 2019-02; Kona Wednesday night issue processing ]

Status to Ready

Date: 2018-10-12.00:00:00

[ 2018-10-12 Tim updates PR to avoid suggesting the creation of a temporary path. ]

Previous resolution [SUPERSEDED]:

This wording is relative to N4713.

  1. Modify [fs.path.concat] as indicated:

    path& operator+=(const path& x);
    path& operator+=(const string_type& x);
    path& operator+=(basic_string_view<value_type> x);
    path& operator+=(const value_type* x);
    path& operator+=(value_type x);
    template<class Source>
      path& operator+=(const Source& x);
    template<class EcharT>
      path& operator+=(EcharT x);
    template<class Source>
      path& concat(const Source& x);
    

    -1- Effects: […]

    -2- Returns: *this.

    path& operator+=(value_type x);
    template<class EcharT>
      path& operator+=(EcharT x);
    

    -?- Effects: Equivalent to: return *this += path(&x, &x + 1);.

Date: 2018-06-18.00:00:00

[ 2018-06-18 after reflector discussion ]

Priority set to 3

Date: 2018-01-24.00:00:00

[fs.path.concat] uses the expression path(x).native() to specify the effects of concatenating a single character x. However, there is no path constructor taking a single character.

History
Date User Action Args
2021-02-25 10:48:01adminsetstatus: wp -> c++20
2019-07-22 15:46:37adminsetstatus: voting -> wp
2019-06-17 05:25:36adminsetstatus: ready -> voting
2019-02-21 17:23:36adminsetmessages: + msg10316
2019-02-21 17:23:36adminsetstatus: new -> ready
2018-10-12 22:33:36adminsetmessages: + msg10161
2018-06-19 05:49:11adminsetmessages: + msg9927
2018-01-24 22:09:15adminsetmessages: + msg9636
2018-01-24 00:00:00admincreate