This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.
Section: 27.11.7 [fs.class.path] Status: Resolved Submitter: Billy O'Neal III Opened: 2016-11-10 Last modified: 2017-07-17
View all other issues in [fs.class.path].
View all issues with Resolved status.
Addresses US 44, LWG 2734The explicit definition of path in terms of a string requires that the abstraction be leaky. Consider that the meaning of the expression p += '/' has very different behavior in the case that p is empty; that a path can uselessly contain null characters; and that iterators must be constant to avoid having to reshuffle the packed string.
Suggested resolution:Define member functions to express a path as a string, but define its state in terms of the abstract sequence of components (including the leading special components) already described by the iterator interface. Remove members that rely on arbitrary manipulation of a string value.
Sat PM: "Looks good"
[Issues Telecon 16-Dec-2016]
Priority 2; should be addressed by omnibus Filesystem paper.
This is resolved by p0492r2.
This wording is relative to N4606.
Edit [fs.path.concat] as follows:
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);
template <class InputIterator> path& concat(InputIterator first, InputIterator last);
Postcondition: native() == prior_native + effective-argument, where prior_native is native() prior to the call to operator+=, and effective-argument is:
if x is present and is const path&, x.native(); otherwise,
if source is present, the effective range of source [ath.re]; otherwise,
>if first and last are present, the range [first, last); otherwise,
-2- Returns: *this.
If the value type of effective-argument would not be path::value_type, the acctual argument or argument range is first converted [ath.type.cv] so that effective-argument has value type path::value_type.