Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

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

      From cppreference.com
      <cpp‎ |io‎ |basic streambuf
       
       
       
      std::basic_streambuf
       
      protected:
      basic_streambuf();
      (1)
      protected:
      basic_streambuf(const basic_streambuf& rhs);
      (2)(since C++11)
      1) Constructs thebasic_streambuf object, initializes the six pointer members (eback(),gptr(),egptr(),pbase(),pptr(), andepptr()) to null pointer values, and the locale member tostd::locale(), a copy of the global C++ locale at the time of construction.
      2) Constructs a copy ofrhs, initializing the six pointers and the locale object with the copies of the values held byrhs. Note that this is a shallow copy: the pointers of the newly-constructed basic_streambuf are pointing into the same character array as the pointers ofrhs.

      Both constructors are protected, and are only called by the concrete streambuf classes, such asstd::basic_filebuf,std::basic_stringbuf, orstd::strstreambuf.

      Contents

      [edit]Parameters

      rhs - a streambuf object to copy

      [edit]Notes

      Until C++11, it was unspecified whetherbasic_streambuf or any of its derived classes isCopyConstructible (LWG issue 421), and different C++ library implementations provided different options.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      constructs abasic_filebuf object
      (public member function ofstd::basic_filebuf<CharT,Traits>)[edit]
      constructs abasic_stringbuf object
      (public member function ofstd::basic_stringbuf<CharT,Traits,Allocator>)[edit]
      constructs astrstreambuf object
      (public member function ofstd::strstreambuf)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/io/basic_streambuf/basic_streambuf&oldid=160640"

      [8]ページ先頭

      ©2009-2025 Movatter.jp