This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++20 status.

### 3055. `path::operator+=(single-character)` misspecified

Section: 29.12.6.5.4 [fs.path.concat] Status: C++20 Submitter: Tim Song Opened: 2018-01-24 Last modified: 2021-02-25

Priority: 3

View all other issues in [fs.path.concat].

View all issues with C++20 status.

Discussion:

29.12.6.5.4 [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.

[2018-06-18 after reflector discussion]

Priority set to 3

[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 29.12.6.5.4 [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);`.

[2019-02; Kona Wednesday night issue processing]

Status to Ready

Proposed resolution:

This wording is relative to N4762.

1. Modify 29.12.6.5.4 [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);`