operator<<,>>(std::experimental::filesystem::path)
From cppreference.com
< 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; } |
| 2番目のバージョン |
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; } |
[編集] 例
| このセクションは未完成です 理由: 例がありません |