[fs.path.assign] (original) (raw)

31 Input/output library [input.output]

31.12 File systems [filesystems]

31.12.6 Class path [fs.class.path]

31.12.6.5 Members [fs.path.member]

31.12.6.5.2 Assignments [fs.path.assign]

path& operator=(const path& p);

Effects: If *this and p are the same object, has no effect.

Otherwise, sets both respective pathnames of *thisto the respective pathnames of p.

path& operator=(path&& p) noexcept;

Effects: If *this and p are the same object, has no effect.

Otherwise, sets both respective pathnames of *thisto the respective pathnames of p.

p is left in a valid but unspecified state.

[Note 1:

A valid implementation is swap(p).

— _end note_]

path& operator=(string_type&& source); path& assign(string_type&& source);

Effects: Sets the pathname in the detected-format of sourceto the original value of source.

source is left in a valid but unspecified state.

template<class Source> path& operator=(const Source& source);template<class Source> path& assign(const Source& source);template<class InputIterator> path& assign(InputIterator first, InputIterator last);

Effects: Let s be the effective range of source ([fs.path.req]) or the range [first, last), with the encoding converted if required ([fs.path.cvt]).

Finds the detected-format of s ([fs.path.fmt.cvt]) and sets the pathname in that format to s.