• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

    最終更新日時(UTC):
    が更新

    履歴 編集

    function
    <ios>

    std::nounitbuf

    namespace std {
      ios_base& nounitbuf(ios_base& str);
    }
    

    概要

    unitbufの効果を取り消すことを指示するマニピュレータ。 これにより、出力操作のたびにバッファをフラッシュされる操作が行われなくなる。

    効果

    str.unsetf(std::ios_base::unitbuf)を実行する。

    戻り値

    実引数のstrオブジェクト。

    備考

    std::cerrstd::wcerrオブジェクトは、 初期状態としてstd::ios_base::unitbufが設定されている。

    #include <iostream>
    
    int main()
    {
      std::cout << std::unitbuf << "test\n";
      std::cout << std::nounitbuf << "test\n";
    }
    

    出力

    test
    test
    

    バージョン

    言語

    • C++03

    参照