path::operator+=
is defined, but not operator+
Section: 31.12.6 [fs.class.path] Status: NAD Submitter: Jonathan Wakely Opened: 2014-07-03 Last modified: 2017-03-19
Priority: 3
View all other issues in [fs.class.path].
View all issues with NAD status.
Discussion:
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.
[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.
[22 Nov 2015 Beman supplies proposed resolution wording.]
[Apr 2016 Issue updated to address the C++ Working Paper. Previously addressed File System TS]
[2016-11-12, Issaquah]
Sat PM: JW is no longer convinced that this is a good idea.
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 classpath
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.