operator<<,>> (std::experimental::filesystem::path)
Technical Specification | ||||
Filesystem library (filesystem TS) | ||||
Library fundamentals (library fundamentals TS) | ||||
Library fundamentals 2 (library fundamentals TS v2) | ||||
Library fundamentals 3 (library fundamentals TS v3) | ||||
Extensions for parallelism (parallelism TS) | ||||
Extensions for parallelism 2 (parallelism TS v2) | ||||
Extensions for concurrency (concurrency TS) | ||||
Extensions for concurrency 2 (concurrency TS v2) | ||||
Concepts (concepts TS) | ||||
Ranges (ranges TS) | ||||
Reflection (reflection TS) | ||||
Mathematical special functions (special functions TR) | ||||
Experimental Non-TS | ||||
Pattern Matching | ||||
Linear Algebra | ||||
std::execution | ||||
Contracts | ||||
2D Graphics |
Classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
File types | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Member functions | ||||
Path decomposition | ||||
Non-member functions | ||||
operator<<
operator>>
|
||||
template
<
class
CharT,
class
Traits
>
std::
basic_ostream
<
CharT,Traits
>
&
|
(1) | (filesystem TS) |
template
<
class
CharT,
class
Traits
>
std::
basic_istream
<
CharT,Traits
>
&
|
(2) | (filesystem TS) |
Performs stream input or output on the path p . std:: quoted is used so that spaces do not cause truncation when later read by stream input operator.
Parameters
os | - | stream to perform output on |
is | - | stream to perform input on |
p | - | path to insert or extract |
Return value
Exceptions
May throw implementation-defined exceptions.
Possible implementation
First version |
---|
template<class CharT, class Traits> std::basic_ostream<CharT,Traits>& operator<<(std::basic_ostream<CharT,Traits>& os, const path& p) { os << std::quoted(p.string<CharT,Traits>()); return os; } |
Second version |
template<class CharT, class Traits> std::basic_istream<CharT,Traits>& operator>>(std::basic_istream<CharT,Traits>& is, path& p) { std::basic_string<CharT, Traits> t; is >> std::quoted(t); p = t; return is; } |
Example
This section is incomplete
Reason: no example |