Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::basic_filebuf<CharT,Traits>::basic_filebuf

      From cppreference.com
      <cpp‎ |io‎ |basic filebuf
       
       
       
       
      basic_filebuf();
      (1)
      basic_filebuf(conststd::basic_filebuf& rhs)= delete;
      (2)(since C++11)
      basic_filebuf(std::basic_filebuf&& rhs);
      (3)(since C++11)

      Constructs newstd::basic_filebuf object.

      1) Constructs astd::basic_filebuf object, initializing the base class by calling the default constructor ofstd::basic_streambuf. The createdbasic_filebuf is not associated with a file, andis_open() returnsfalse.
      2) The copy constructor is deleted;std::basic_filebuf is notCopyConstructible.
      3) Move-constructs astd::basic_filebuf object by moving all contents from anotherstd::basic_filebuf objectrhs, including the buffers, the associated file, the locale, the openmode, the is_open variable, and all other state. After move,rhs is not associated with a file andrhs.is_open()==false. The member pointers of the base classstd::basic_streambuf ofrhs and of the base class of*this are guaranteed to point to different buffers (unless null).

      Contents

      [edit]Parameters

      rhs - anotherbasic_filebuf

      [edit]Notes

      Typically called by the constructor ofstd::basic_fstream.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      (C++11)
      assigns abasic_filebuf object
      (public member function)[edit]
      [virtual]
      destructs abasic_filebuf object and closes the file if it is open
      (virtual public member function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/io/basic_filebuf/basic_filebuf&oldid=160450"

      [8]ページ先頭

      ©2009-2025 Movatter.jp