「cpp/io/basic istream/swap」の版間の差分
提供: cppreference.com
< cpp | io | basic istream
細 (r2.7.3) (ロボットによる 追加: de, en, es, fr, it, pt, ru, zh) |
細 (Use {{lc}}. Update links. Various fixes.) |
||
2行: | 2行: | ||
{{cpp/io/basic_istream/title | swap}} | {{cpp/io/basic_istream/title | swap}} | ||
{{cpp/io/basic_istream/navbar}} | {{cpp/io/basic_istream/navbar}} | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| =c++11 |1= |
protected: | protected: | ||
void swap(basic_istream& rhs); | void swap(basic_istream& rhs); | ||
}} | }} | ||
− | {{ | + | {{end}} |
− | {{tr|{{c|basic_ios::swap(rhs)}}は、すべてのデータ{{c|rdbuf()}}を除く基本クラスのメンバ、およびスワップ{{rlpf|gcount}}と{{c|*this}}の間{{tt|rhs}}カウンタの値を交換するために呼び出す。このスワップ機能が保護されています:それは、スワップ可能な入力ストリームクラスのスワップ機能によって呼び出され{{ | + | {{tr|{{c|basic_ios::swap(rhs)}}は、すべてのデータ{{c|rdbuf()}}を除く基本クラスのメンバ、およびスワップ{{rlpf|gcount}}と{{c|*this}}の間{{tt|rhs}}カウンタの値を交換するために呼び出す。このスワップ機能が保護されています:それは、スワップ可能な入力ストリームクラスのスワップ機能によって呼び出され{{|std::basic_ifstream}}と{{|std::basic_istringstream}}、正しく関連付けstreambuffersを交換する方法を知っている.|Calls {{c|basic_ios::swap(rhs)}} to swap all data members of the base class except for {{c|rdbuf()}}, and swaps the values of the {{rlpf|gcount}} counters between {{c|*this}} and {{tt|rhs}}. This swap function is protected: it is called by the swap functions of the swappable input stream classes {{|std::basic_ifstream}} and {{|std::basic_istringstream}}, which know how to correctly swap the associated streambuffers.}} |
===パラメータ=== | ===パラメータ=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| rhs |{{tr| と交換するために、同じタイプの別のオブジェクトbasic_istream| different basic_istream object of the same type to swap with}}}} |
− | {{ | + | {{end}} |
===例=== | ===例=== |
2013年7月2日 (火) 13:19時点における版
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
protected: void swap(basic_istream& rhs); |
(C++11以上) | |
basic_ios::swap(rhs)は、すべてのデータrdbuf()を除く基本クラスのメンバ、およびスワップ
gcount()
と*thisの間rhs
カウンタの値を交換するために呼び出す。このスワップ機能が保護されています:それは、スワップ可能な入力ストリームクラスのスワップ機能によって呼び出されstd::basic_ifstreamとstd::basic_istringstream、正しく関連付けstreambuffersを交換する方法を知っている.Original:
Calls basic_ios::swap(rhs) to swap all data members of the base class except for rdbuf(), and swaps the values of the
gcount()
counters between *this and rhs
. This swap function is protected: it is called by the swap functions of the swappable input stream classes std::basic_ifstream and