operator<<,>> (std::experimental::filesystem::path)
From ja.cppreference.net
<
cpp
|
experimental
|
fs
|
path
|
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) |
パス p に対してストリーム入出力を実行します。 std:: quoted が使用されるため、後でストリーム入力演算子によって読み込まれる際にスペースによる切り詰めが発生しません。
目次 |
パラメータ
| os | - | 出力を実行するストリーム |
| is | - | 入力を行うストリーム |
| p | - | 挿入または抽出するパス |
戻り値
1)
os
2)
is
例外
実装定義の例外をスローする可能性があります。
実装例
| 第一バージョン |
|---|
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; } |
| 第二バージョン |
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; } |
例
|
このセクションは不完全です
理由: 例がありません |