Namespaces
Variants

std::basic_streambuf<CharT,Traits>:: basic_streambuf

From ja.cppreference.net
protected :
basic_streambuf ( ) ;
(1)
protected :
basic_streambuf ( const basic_streambuf & rhs ) ;
(2) (C++11以降)
1) basic_streambufオブジェクトを構築し、6つのポインタメンバー( eback()、 gptr()、 egptr()、 pbase()、 pptr()、および epptr())をnullポインタ値に初期化し、ロケールメンバーを std:: locale ( ) に、構築時のグローバルC++ロケールのコピーとして初期化します。
2) rhs のコピーを構築し、6つのポインタとロケールオブジェクトを rhs が保持する値のコピーで初期化します。これは浅いコピーであることに注意してください:新しく構築されたbasic_streambufのポインタは、 rhs のポインタと同じ文字配列を指しています。

両方のコンストラクタはprotectedであり、具体的なストリームバッファクラス( std::basic_filebuf 、 std::basic_stringbuf 、または std::strstreambuf )によってのみ呼び出されます。

目次

パラメータ

rhs - コピーするstreambufオブジェクト

注記

C++11 まで、 basic_streambuf またはその派生クラスが CopyConstructible であるかどうかは未規定でした LWG issue 421 。また、異なる C++ ライブラリ実装では異なる選択肢が提供されていました。

例

関連項目

basic_filebufオブジェクトを構築する
(std::basic_filebuf<CharT,Traits>のpublicメンバ関数)
basic_stringbufオブジェクトを構築する
(std::basic_stringbuf<CharT,Traits,Allocator>のpublicメンバ関数)
strstreambufオブジェクトを構築する
(std::strstreambufのpublicメンバ関数)