The Wayback Machine - https://web.archive.org/web/20180302223648/http://ja.cppreference.com:80/w/cpp/header
名前空間
変種
操作

C++標準ライブラリヘッダファイル

提供: cppreference.com
< cpp
 
 
 

C++標準ライブラリのインタフェースは以下のヘッダファイル群により定義されます。

目次

ユーティリティライブラリ

<cstdlib> 汎用ユーティリティ: プログラム制御動的メモリ確保乱数ソートと検索
<csignal> シグナル管理のための関数とマクロ定数
<csetjmp> 実行コンテキストを保存 (およびジャンプ) するマクロ (および関数)
<cstdarg> 可変個引数リストの処理
<typeinfo> 実行時型情報ユーティリティ
<typeindex>(C++11およびそれ以降)std::type_index
<type_traits>(C++11およびそれ以降)コンパイル時型情報
<bitset>std::bitset クラステンプレート
<functional> 関数オブジェクト、関数呼び出し、バインド操作、参照ラッパー
<utility> 様々なユーティリティ部品
<ctime> C スタイルの日付と時間のユーティリティ
<chrono>(C++11およびそれ以降) C++ の時間ユーティリティ
<cstddef> 標準的なマクロと typedef
<initializer_list>(C++11およびそれ以降)std::initializer_list クラステンプレート
<tuple>(C++11およびそれ以降)std::tuple クラステンプレート
<any>(C++17およびそれ以降)std::any クラス
<optional>(C++17およびそれ以降)std::optional クラステンプレート
<variant>(C++17およびそれ以降)std::variant クラステンプレート
<compare>(C++20およびそれ以降)三方比較演算子サポート
動的メモリ管理
<new> 低水準メモリ管理ユーティリティ
<memory> 高水準メモリ管理ユーティリティ
<scoped_allocator>(C++11およびそれ以降) ネストされたアロケータクラス
<memory_resource>(C++17およびそれ以降) 多相アロケータとメモリリソース
数値の限界
<climits> 整数型の限界
<cfloat> 浮動小数点型の限界
<cstdint>(C++11およびそれ以降) 固定サイズの型他の型の限界
<cinttypes>(C++11およびそれ以降) 書式マクロintmax_t および uintmax_t の数学と変換
<limits> 算術型の特性を問い合わせる標準化された方法
エラー処理
<exception> 例外処理ユーティリティ
<stdexcept> 標準の例外オブジェクト
<cassert> 引数をゼロと比較する条件コンパイルされるマクロ
<system_error>(C++11およびそれ以降) プラットフォーム依存のエラーコード std::error_code の定義
<cerrno> 最後のエラーコードを保持するマクロ

文字列ライブラリ

<cctype> 文字の種類を判定する関数
<cwctype> ワイド文字の種類を判定する関数
<cstring> 様々なナロー文字列処理関数
<cwchar> 様々なワイドおよびマルチバイト文字列処理関数
<cuchar>(C++11およびそれ以降) C スタイルの Unicode 文字変換関数
<string>std::basic_string クラステンプレート
<string_view>(C++17およびそれ以降)std::basic_string_view クラステンプレート
<charconv>(C++17およびそれ以降)std::to_chars および std::from_chars

コンテナライブラリ

<array>(C++11およびそれ以降)std::array コンテナ
<vector>std::vector コンテナ
<deque>std::deque コンテナ
<list>std::list コンテナ
<forward_list>(C++11およびそれ以降)std::forward_list コンテナ
<set>std::set および std::multiset 連想コンテナ
<map>std::map および std::multimap 連想コンテナ
<unordered_set>(C++11およびそれ以降)std::unordered_set および std::unordered_multiset 非順序連想コンテナ
<unordered_map>(C++11およびそれ以降)std::unordered_map および std::unordered_multimap 非順序連想コンテナ
<stack>std::stack コンテナアダプタ
<queue>std::queue および std::priority_queue コンテナアダプタ

アルゴリズムライブラリ

<algorithm> コンテナ操作アルゴリズム
<execution>(C++17) アルゴリズムの並列実行バージョンのための定義済みの実行ポリシー

イテレータライブラリ

<iterator> コンテナのイテレータ

数値演算ライブラリ

<cmath> 一般的な数学関数
<complex> 複素数型
<valarray> 値の配列を表現、操作するためのクラス
<random>(C++11およびそれ以降) 乱数生成および分布
<numeric> コンテナ内の値に対する数値演算
<ratio>(C++11およびそれ以降) コンパイル時有理数算術
<cfenv>(C++11およびそれ以降) 浮動小数点環境にアクセスする関数

入出力ライブラリ

<iosfwd> 入出力ライブラリのすべてのクラスの前方宣言
<ios>std::ios_base クラス、std::basic_ios クラステンプレートといくつかの typedef
<istream>std::basic_istream クラステンプレートといくつかの typedef
<ostream>std::basic_ostream, std::basic_iostream クラステンプレートといくつかの typedef
<iostream> いくつかの標準ストリームオブジェクト
<fstream>std::basic_fstream, std::basic_ifstream, std::basic_ofstream クラステンプレートといくつかの typedef
<sstream>std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream クラステンプレートといくつかの typedef
<syncstream>(C++20およびそれ以降)std::basic_osyncstream, std::basic_syncbuf と typedef
<strstream>(廃止予定)std::strstream, std::istrstream, std::ostrstream
<iomanip> 入出力の書式を制御するヘルパー関数
<streambuf>std::basic_streambuf クラステンプレート
<cstdio> C スタイルの入出力関数

ローカライゼーションライブラリ

<locale> ローカライゼーションユーティリティ
<clocale> C のローカライゼーションユーティリティ
<codecvt>(C++11およびそれ以降)(deprecated in C++17) Unicode 変換機能

正規表現ライブラリ

<regex>(C++11およびそれ以降) 正規表現処理をサポートするクラス、アルゴリズムおよびイテレータ

アトミック操作ライブラリ

<atomic>(C++11およびそれ以降) アトミック操作ライブラリ

スレッドサポートライブラリ

<thread>(C++11およびそれ以降)std::thread クラスとサポート関数
<mutex>(C++11およびそれ以降) 相互排他プリミティブ
<shared_mutex>(C++14およびそれ以降) 共有可能な相互排他プリミティブ
<future>(C++11およびそれ以降) 非同期計算のためのプリミティブ
<condition_variable>(C++11およびそれ以降)スレッドの待機状態

ファイルシステムライブラリ

<filesystem>(C++17およびそれ以降)std::path クラスとサポート関数

実験的なライブラリ

<experimental/algorithm>(library fundamentals TS) Standard libraries extensions and Extensions for Parallelism
<experimental/any>(library fundamentals TS) Standard libraries extensions
<experimental/chrono>(library fundamentals TS) Standard libraries extensions
<experimental/deque>(library fundamentals TS) Standard libraries extensions
<experimental/execution_policy>(parallelism TS) Extensions for Parallelism
<experimental/exception_list>(parallelism TS) Extensions for Parallelism
<experimental/filesystem>(filesystem TS) Filesystem library
<experimental/forward_list>(library fundamentals TS) Standard libraries extensions
<experimental/future>(library fundamentals TS) Standard libraries extensions
<experimental/list>(library fundamentals TS) Standard libraries extensions
<experimental/functional>(library fundamentals TS) Standard libraries extensions
<experimental/map>(library fundamentals TS) Standard libraries extensions
<experimental/memory>(library fundamentals TS) Standard libraries extensions
<experimental/memory_resource>(library fundamentals TS) Standard libraries extensions
<experimental/numeric>(parallelism TS) Extensions for Parallelism
<experimental/optional>(library fundamentals TS) Standard libraries extensions
<experimental/ratio>(library fundamentals TS) Standard libraries extensions
<experimental/regex>(library fundamentals TS) Standard libraries extensions
<experimental/set>(library fundamentals TS) Standard libraries extensions
<experimental/string>(library fundamentals TS) Standard libraries extensions
<experimental/string_view>(library fundamentals TS) Standard libraries extensions
<experimental/system_error>(library fundamentals TS) Standard libraries extensions
<experimental/tuple>(library fundamentals TS) Standard libraries extensions
<experimental/type_traits>(library fundamentals TS) Standard libraries extensions
<experimental/unordered_map>(library fundamentals TS) Standard libraries extensions
<experimental/unordered_set>(library fundamentals TS) Standard libraries extensions
<experimental/utility>(library fundamentals TS) Standard libraries extensions
<experimental/vector>(library fundamentals TS) Standard libraries extensions

[編集]C 互換ヘッダ

For some of the C standard library headers of the form xxx.h, the C++ standard library both includes an identically-named header and another header of the form cxxx (all meaningful cxxx headers are listed above).

With the exception of complex.h , each xxx.h header included in the C++ standard library places in the global namespace each name that the corresponding cxxx header would have placed in the std namespace.

These headers are allowed to also declare the same names in the std namespace, and the corresponding cxxx headers are allowed to also declare the same names in the global namespace: including <cstdlib> definitely provides std::malloc and may also provide ::malloc. Including <stdlib.h> definitely provides ::malloc and may also provide std::malloc. This applies even to functions and function overloads that are not part of C standard library.

<assert.h>(廃止予定) behaves as if each name from <cassert> is placed in global namespace
<ctype.h>(廃止予定) behaves as if each name from <cctype> is placed in global namespace
<errno.h>(廃止予定) behaves as if each name from <cerrno> is placed in global namespace
<fenv.h>(廃止予定) behaves as if each name from <cfenv> is placed in global namespace
<float.h>(廃止予定) behaves as if each name from <cfloat> is placed in global namespace
<inttypes.h>(廃止予定) behaves as if each name from <cinttypes> is placed in global namespace
<limits.h>(廃止予定) behaves as if each name from <climits> is placed in global namespace
<locale.h>(廃止予定) behaves as if each name from <clocale> is placed in global namespace
<math.h>(廃止予定) behaves as if each name from <cmath> is placed in global namespace
except for names of mathematical special functions
<setjmp.h>(廃止予定) behaves as if each name from <csetjmp> is placed in global namespace
<signal.h>(廃止予定) behaves as if each name from <csignal> is placed in global namespace
<stdarg.h>(廃止予定) behaves as if each name from <cstdarg> is placed in global namespace
<stddef.h>(廃止予定) behaves as if each name from <cstddef> is placed in global namespace
except for names of std::byte and related functions
<stdint.h>(廃止予定) behaves as if each name from <cstdint> is placed in global namespace
<stdio.h>(廃止予定) behaves as if each name from <cstdio> is placed in global namespace
<stdlib.h>(廃止予定) behaves as if each name from <cstdlib> is placed in global namespace
<string.h>(廃止予定) behaves as if each name from <cstring> is placed in global namespace
<time.h>(廃止予定) behaves as if each name from <ctime> is placed in global namespace
<uchar.h>(廃止予定) behaves as if each name from <cuchar> is placed in global namespace
<wchar.h>(廃止予定) behaves as if each name from <cwchar> is placed in global namespace
<wctype.h>(廃止予定) behaves as if each name from <cwctype> is placed in global namespace

[編集]サポートされない C のヘッダ

The C headers <stdatomic.h>, <stdnoreturn.h>, and <threads.h> are not included in C++ and have no cxxx equivalents.

[編集]空の C のヘッダ

The headers <complex.h>, <ccomplex>, <tgmath.h>, and <ctgmath> do not contain any content from the C standard library and instead merely include other headers from the C++ standard library. The use of all these headers is deprecated in C++.

<ccomplex>(C++11およびそれ以降)(deprecated in C++17) simply includes the header <complex>
<complex.h>(廃止予定) simply includes the header <complex>
<ctgmath>(C++11およびそれ以降)(deprecated in C++17) simply includes the headers <complex> and <cmath>: the overloads equivalent to the contents of the C header tgmath.h are already provided by those headers
<tgmath.h>(廃止予定) simply includes the header <ctgmath>

[編集]意味のない C のヘッダ

The headers <ciso646>, <cstdalign>, and <cstdbool> are meaningless in C++ because the macros they provide in C are language keywords in C++.

<ciso646> empty header. The macros that appear in iso646.h in C are keywords in C++
<iso646.h>(廃止予定) behaves as if each name from <ciso646> is placed in global namespace
<cstdalign>(C++11およびそれ以降)(deprecated in C++17) defines one compatibility macro constant
<stdalign.h>(廃止予定) behaves as if each name from <cstdalign> is placed in global namespace
<cstdbool>(C++11およびそれ以降)(deprecated in C++17) defines one compatibility macro constant
<stdbool.h>(廃止予定) behaves as if each name from <cstdbool> is placed in global namespace

[編集]関連項目

C標準ライブラリヘッダファイルC言語リファレンス
close