Title
path::operator+= is defined, but not operator+
Status
nad
Section
[fs.class.path]
Submitter
Jonathan Wakely

Created on 2014-07-03.00:00:00 last changed 90 months ago

Messages

Date: 2016-11-21.05:09:01

Proposed resolution:

NAD, Future.

It is not necessary to provide every possible string operation for class path because it is always possible to convert to a string, perform the operation, and convert back to a path. The most commonly needed string operations are provided for class path as a convenience, but every added function comes at the cost of increased interface complexity. In this case, the cost is judged to outweigh the convenience.

Future changes to the language, such as concepts, and changes to the library, such as basic_string_view, may allow reduction of the complexity of the class path interface. The LWG may wish to reconsider this issue at that time.

Date: 2016-11-15.00:00:00

[ 2016-11-12, Issaquah ]

Sat PM: JW is no longer convinced that this is a good idea.

Date: 2016-04-10.22:23:37

[ Apr 2016 Issue updated to address the C++ Working Paper. Previously addressed File System TS ]

Date: 2016-01-28.01:00:35

[ 22 Nov 2015 Beman supplies proposed resolution wording. ]

Date: 2016-01-28.01:00:35

[ 04 Jul 2014 Beman Dawes comments: ]

The 12 overloads required by basic_string operator+ scared me off, and I never came back to the issue.

Date: 2016-04-10.22:23:37

This doesn't seem to be in Boost.Filesystem, so maybe it isn't needed, but since path += path2 works then it seems reasonable to expect path1 + path2 to work as well.

History
Date User Action Args
2016-11-21 05:09:01adminsetmessages: + msg8659
2016-11-21 05:09:01adminsetstatus: new -> nad
2016-04-10 22:23:37adminsetmessages: + msg8041
2016-01-28 01:00:35adminsetmessages: + msg7927
2016-01-28 01:00:35adminsetmessages: + msg7926
2016-01-28 01:00:35adminsetmessages: + msg7925
2014-07-03 00:00:00admincreate