diff --git a/lang/cpp11/alignas.md b/lang/cpp11/alignas.md index 1d06bfb500..674e3b2ada 100644 --- a/lang/cpp11/alignas.md +++ b/lang/cpp11/alignas.md @@ -102,7 +102,7 @@ alignas(8) alignas(16) int i8_16: 16 * ハードウェアの制約を満たす * 同じアドレスに異なるデータを格納する -C++03で変数のアライメントを行うにはコンパイラの拡張機能を利用するしかなく、コンパイラごとに異なる記述を行う必要があったが、C++11ではどのコンパイラでも同じ記述でアライメントができる。 +C++98で変数のアライメントを行うにはコンパイラの拡張機能を利用するしかなく、コンパイラごとに異なる記述を行う必要があったが、C++11ではどのコンパイラでも同じ記述でアライメントができる。 ## 検討されたほかの選択肢 diff --git a/lang/cpp11/alignof.md b/lang/cpp11/alignof.md index e42996a814..4a24c1dfa3 100644 --- a/lang/cpp11/alignof.md +++ b/lang/cpp11/alignof.md @@ -71,7 +71,7 @@ char *: 4 ## この機能が必要になった背景・経緯 -C++03で型のアライメントサイズを得るにはコンパイラの拡張機能を利用するしかなく、コンパイラごとに異なる記述を行う必要があったが、C++11ではどのコンパイラでも同じ記述でアライメントサイズが取得できる。 +C++98で型のアライメントサイズを得るにはコンパイラの拡張機能を利用するしかなく、コンパイラごとに異なる記述を行う必要があったが、C++11ではどのコンパイラでも同じ記述でアライメントサイズが取得できる。 ## 検討されたほかの選択肢 diff --git a/lang/cpp11/auto.md b/lang/cpp11/auto.md index fc234c6605..a3e9aab387 100644 --- a/lang/cpp11/auto.md +++ b/lang/cpp11/auto.md @@ -26,7 +26,7 @@ auto f = []{}; // f は 引数を取らずに値を返さ * std::make_shared[link ../../reference/memory/make_shared.md] 型推論のための `auto` は、基本的には糖衣構文であり具体的な型で書き替えることが可能であるが、上記のクロージャ型のように書き換えが不可能なケースも存在する。 -この機能の追加に伴って、C++03 までの `auto` に存在した、自動変数である事を意味する記憶クラス指定子としての使用はできなくなった。 +この機能の追加に伴って、C++98 までの `auto` に存在した、自動変数である事を意味する記憶クラス指定子としての使用はできなくなった。 なお、`auto` は[戻り値の型を後置する関数宣言構文](trailing_return_types.md)でも使用されるが、その場合の `auto` には型推論の意味は無い。 さらに、C++14 では `auto` キーワードを使用する機能として、[ユーザ定義変換関数の型推論](../cpp14/return_type_deduction_for_normal_functions.md)、[通常関数の戻り値型推論](../cpp14/return_type_deduction_for_normal_functions.md)、[後置戻り値型をプレースホルダーにすることを許可](../cpp14/placeholder_type_in_trailing_return_type.md)、[ジェネリックラムダ](../cpp14/generic_lambdas.md)、および、[`decltype(auto)`](../cpp14/decltype_auto.md) が追加されている。 diff --git a/lang/cpp11/decltype.md b/lang/cpp11/decltype.md index 305e129c76..5a2c2815ae 100644 --- a/lang/cpp11/decltype.md +++ b/lang/cpp11/decltype.md @@ -229,7 +229,7 @@ template ??? trace(Func f, T t) { std::cout << "Calling f"; return f(t); } ``` -C++03 まででは、このような関数テンプレートの戻り値型をあらゆるケースで正確に表現することは不可能だった。 +C++98 まででは、このような関数テンプレートの戻り値型をあらゆるケースで正確に表現することは不可能だった。 C++11 では、本機能と[戻り値の型を後置する関数宣言構文](trailing_return_types.md)を使用することによって、以下のように書くことができるようになった。 diff --git a/lang/cpp11/dependent_name_specifier_outside_of_templates.md b/lang/cpp11/dependent_name_specifier_outside_of_templates.md index 63dda2aae3..8b391fb2f5 100644 --- a/lang/cpp11/dependent_name_specifier_outside_of_templates.md +++ b/lang/cpp11/dependent_name_specifier_outside_of_templates.md @@ -14,7 +14,7 @@ テンプレート内で、推論できないテンプレートパラメータを持つメンバ関数を呼び出す場合には、メンバ関数名の前に`template`キーワードを付ける必要がある。 -C++03まで、テンプレート外で`typename`と`template`を付けるとコンパイルエラーになっていたが、C++11では、テンプレート外で`typename`と`template`を付けることが許可された。 +C++98まで、テンプレート外で`typename`と`template`を付けるとコンパイルエラーになっていたが、C++11では、テンプレート外で`typename`と`template`を付けることが許可された。 これは、テンプレート内とテンプレート外で、共通のコードを利用できるようにするためである。 diff --git a/lang/cpp11/extend_friend_targets.md b/lang/cpp11/extend_friend_targets.md index a5357069ab..674f4f46df 100644 --- a/lang/cpp11/extend_friend_targets.md +++ b/lang/cpp11/extend_friend_targets.md @@ -10,7 +10,7 @@ ## 概要 -C++03までの`friend`宣言は、直接のクラス型のみを指定できた。 +C++98までの`friend`宣言は、直接のクラス型のみを指定できた。 C++11では`friend`宣言が拡張され、テンプレートパラメータ、および型の別名もまた`friend`宣言できるようになった。 diff --git a/lang/cpp11/noexcept.md b/lang/cpp11/noexcept.md index ed0bfb118d..6c8440d5df 100644 --- a/lang/cpp11/noexcept.md +++ b/lang/cpp11/noexcept.md @@ -72,7 +72,7 @@ struct X { * noexcept[color ff0000] - `noexcept`もしくは`noexcept(trueに評価される整数定数式)`が指定された関数が例外を送出した場合、[`std::terminate()`](/reference/exception/terminate.md)関数を呼び出してプログラムを異常終了させる。その際、[`std::terminate()`](/reference/exception/terminate.md)関数が呼び出される前に、スタックの巻き戻しは起こらない可能性がある。 -- 従来の`throw`キーワードによる例外仕様(C++03ではexception specification、C++11ではdynamic exception specificationと呼ばれる仕様)は、C++11以降で非推奨である。 +- 従来の`throw`キーワードによる例外仕様(C++98ではexception specification、C++11ではdynamic exception specificationと呼ばれる仕様)は、C++11以降で非推奨である。 - `noexcept`の指定可能な位置は、[参照修飾](/lang/cpp11/ref_qualifier_for_this.md)の後、[戻り値の型を後置する関数宣言構文](/lang/cpp11/trailing_return_types.md)の前である。 ### 式が例外を送出する可能性があるか判定するnoexcept演算子 diff --git a/lang/cpp11/nullptr.md b/lang/cpp11/nullptr.md index aa7438102b..54e2f83b53 100644 --- a/lang/cpp11/nullptr.md +++ b/lang/cpp11/nullptr.md @@ -16,7 +16,7 @@ int* p = nullptr; ``` -C++03まで、ヌルポインタを表すために`0`数値リテラルや[`NULL`](/reference/cstddef/null.md)マクロを使用していた。C++11からは、`nullptr`キーワードでヌルポインタ値を表すことを推奨する。 +C++98まで、ヌルポインタを表すために`0`数値リテラルや[`NULL`](/reference/cstddef/null.md)マクロを使用していた。C++11からは、`nullptr`キーワードでヌルポインタ値を表すことを推奨する。 特定の型へのポインタではなく、`nullptr`のみを受け取りたい場合は、[`std::nullptr_t`][nullptr_t]型を使用する。 diff --git a/lang/cpp11/override_final.md b/lang/cpp11/override_final.md index bf899feab1..b3d98ab356 100644 --- a/lang/cpp11/override_final.md +++ b/lang/cpp11/override_final.md @@ -244,9 +244,9 @@ class D explicit : public B { - N2365では`[[check_names]]`、`[[new]]`、`[[hiding]]`属性(attribute)の追加と、`virtual`キーワードの意味の変更が提案された。 - N2236にて属性が文法として提案されたため、それを使ったようだ。 - `[[check_names]]`は明示的にオーバーライドのチェックを行う宣言である。 - - `[[check_names]]`を指定しなければ、C++03までと同じ動作をする。 + - `[[check_names]]`を指定しなければ、C++98までと同じ動作をする。 - N2108では`[[check_names]]`の考え方がなかったため、過去との互換性が失われていた。 - - オーバーライドのチェックの有無を選べるようにすることで、C++03で正しかったコードを破壊しないように配慮された。 + - オーバーライドのチェックの有無を選べるようにすることで、C++98で正しかったコードを破壊しないように配慮された。 - `[[new]]`は新たな仮想メンバ関数を宣言し、オーバーライドしていれば文法違反となる。 - N2108の`new virtual`キーワードとほぼ同じアイデアである。 - `[[hiding]]`は基底クラスの仮想メンバ関数をオーバーライドせず、同名の別関数で隠す(hiding)ことを宣言する。隠せていなければ文法違反となる。 diff --git a/lang/cpp11/range_based_for.md b/lang/cpp11/range_based_for.md index 1480b6fd6c..391b97a8e5 100644 --- a/lang/cpp11/range_based_for.md +++ b/lang/cpp11/range_based_for.md @@ -14,7 +14,7 @@ 範囲for文が便利な例として、コンテナの各要素を処理するループを挙げる。 -C++03のfor文では以下のように書ける: +C++98のfor文では以下のように書ける: ```cpp std::vector v; @@ -68,7 +68,7 @@ for-range-initializerにはfor文が処理すべき範囲を表す値を書く 従って標準コンテナのみならず、ユーザ定義のクラスに対しても範囲for文を適用可能である。 -C++03のfor文と異なりセミコロンではなくコロンで区切ることに注意する。 +C++98のfor文と異なりセミコロンではなくコロンで区切ることに注意する。 ### for文への展開 diff --git a/lang/cpp11/recursive_template_limit.md b/lang/cpp11/recursive_template_limit.md index 84fd2d192f..74052dbd7c 100644 --- a/lang/cpp11/recursive_template_limit.md +++ b/lang/cpp11/recursive_template_limit.md @@ -10,7 +10,7 @@ ## 概要 -C++03まで、テンプレートの再帰回数は、「17回以上であることを実装に推奨する」というものであった。 +C++98まで、テンプレートの再帰回数は、「17回以上であることを実装に推奨する」というものであった。 C++11からはこれが、1024回に緩和された。 diff --git a/lang/cpp11/reference_collapsing.md b/lang/cpp11/reference_collapsing.md index fcba5498fc..a5514d35c7 100644 --- a/lang/cpp11/reference_collapsing.md +++ b/lang/cpp11/reference_collapsing.md @@ -10,7 +10,7 @@ ## 概要 -C++03までは、`T&`型に左辺値参照を足すと、「参照への参照 (reference to reference)」となってしまいコンパイルエラーとなっていた。 +C++98までは、`T&`型に左辺値参照を足すと、「参照への参照 (reference to reference)」となってしまいコンパイルエラーとなっていた。 C++11では、型の別名定義、テンプレートパラメータ、および`decltype`の文脈において、`T&`型に左辺値参照を足しても`T&`型となることが規定された。これを「reference collapsing (参照を折りたたむ)」という。 @@ -22,7 +22,7 @@ int main() { typedef int& ir; - // C++03ではint& &となりコンパイルエラー + // C++98ではint& &となりコンパイルエラー // C++11ではint&となりOK typedef ir& irr; } @@ -37,7 +37,7 @@ struct add_lvalue_reference { typedef T& type; }; -// C++03では、参照への参照にならないように、この部分特殊化が必要 +// C++98では、参照への参照にならないように、この部分特殊化が必要 // C++11ではこの部分特殊化は必要ない (あっても問題はない) template struct add_lvalue_reference { diff --git a/lang/cpp11/result_of_integer_division_and_modulo.md b/lang/cpp11/result_of_integer_division_and_modulo.md index cbe521f7da..fb72a1015c 100644 --- a/lang/cpp11/result_of_integer_division_and_modulo.md +++ b/lang/cpp11/result_of_integer_division_and_modulo.md @@ -10,13 +10,13 @@ ## 概要 -整数`a`, `b`に対する除算`a/b`の結果(商)と剰余算`a%b`の結果(余り)について`(a/b)*b + a%b = a`という等式が成り立つことが規定されているが、C++03まで、少なくとも一方が負の数である場合の余りの符号は実装定義だった。このため先述の等式により商も実装定義となっていた。C++11ではC99に合わせて「商の小数部がゼロ方向に切り捨てられた結果となること」が規定された。 +整数`a`, `b`に対する除算`a/b`の結果(商)と剰余算`a%b`の結果(余り)について`(a/b)*b + a%b = a`という等式が成り立つことが規定されているが、C++98まで、少なくとも一方が負の数である場合の余りの符号は実装定義だった。このため先述の等式により商も実装定義となっていた。C++11ではC99に合わせて「商の小数部がゼロ方向に切り捨てられた結果となること」が規定された。 これにより、整数に対する除算と剰余算の結果が移植性のある値となるようになった。 ## 仕様 -C++03では、余りの符号が以下のように規定されていた: +C++98では、余りの符号が以下のように規定されていた: 「両方の項が非負である場合、余りは非負となる。片方もしくは両方の項が負数である場合、余りの符号は実装定義となる。注釈:現在作業中のISO Cのリビジョン(C99のこと)とISO/IEC 1539:1991で標準化されているFortranの規格ではいずれも、整数に対する除算の商は必ずゼロ方向に丸められる。」 @@ -31,9 +31,9 @@ C++11では、C99との互換性のために、上記規定を置き換えて、 int main() { - assert(-7 / +2 == -3 && -7 % +2 == -1); // C++03 までは商 -4 余り +1 となる実装も規格適合 - assert(+7 / -2 == -3 && +7 % -2 == +1); // C++03 までは商 -4 余り -1 となる実装も規格適合 - assert(-7 / -2 == +3 && -7 % -2 == -1); // C++03 までは商 +4 余り +1 となる実装も規格適合 + assert(-7 / +2 == -3 && -7 % +2 == -1); // C++98 までは商 -4 余り +1 となる実装も規格適合 + assert(+7 / -2 == -3 && +7 % -2 == +1); // C++98 までは商 -4 余り -1 となる実装も規格適合 + assert(-7 / -2 == +3 && -7 % -2 == -1); // C++98 までは商 +4 余り +1 となる実装も規格適合 } ``` diff --git a/lang/cpp11/right_angle_brackets.md b/lang/cpp11/right_angle_brackets.md index 235306c19e..20ea724a56 100644 --- a/lang/cpp11/right_angle_brackets.md +++ b/lang/cpp11/right_angle_brackets.md @@ -10,7 +10,7 @@ ## 概要 -C++03では、2つ以上連続する右山カッコが出現する場合には、間にスペースを入力する必要があった: +C++98では、2つ以上連続する右山カッコが出現する場合には、間にスペースを入力する必要があった: ```cpp vector >; // OK @@ -37,7 +37,7 @@ AY> b; // コンパイルエラー // 2つ目の>トークンがoperator>()と見なされる。 ``` -ただしこの仕様により、C++03までの以下のようなプログラムの動作が変更となる: +ただしこの仕様により、C++98までの以下のようなプログラムの動作が変更となる: ```cpp example #include @@ -58,7 +58,7 @@ int main() { } ``` -C++03での出力: +C++98での出力: ``` 0 @@ -89,7 +89,7 @@ int main() ## この機能が必要になった背景・経緯 -C++03までは構文解析の都合で、テンプレートの右山カッコが不等号やシフト記号と曖昧になっていた。そのためにテンプレートの右山カッコを明示する際には、2つの連続する右山カッコの間にスペースを必要とした。 +C++98までは構文解析の都合で、テンプレートの右山カッコが不等号やシフト記号と曖昧になっていた。そのためにテンプレートの右山カッコを明示する際には、2つの連続する右山カッコの間にスペースを必要とした。 これは小さな問題ではあるが、永続的で迷惑な問題であったために、この問題を除去する価値があると判断され、GNUやEDGといったコンパイラベンダーによるいくつかの実験を経て、標準C++に、連続する右山カッコに関するルールが追加されることとなった。 diff --git a/lang/cpp11/rvalue_ref_and_move_semantics.md b/lang/cpp11/rvalue_ref_and_move_semantics.md index 40b7ed3233..9d4d685e50 100644 --- a/lang/cpp11/rvalue_ref_and_move_semantics.md +++ b/lang/cpp11/rvalue_ref_and_move_semantics.md @@ -45,7 +45,7 @@ int main() 右辺値参照は、右辺値のみを束縛する参照である。 C++11からは、型`T`に対して `T&` で宣言される参照型を左辺値参照と呼ぶのに対して、`T&&` で宣言される参照型を右辺値参照と呼ぶ。 -C++03までは、右辺値のみを扱う右辺値参照は存在せず、右辺値はconst左辺値参照 `const T&` に束縛するよう扱われていた。 +C++98までは、右辺値のみを扱う右辺値参照は存在せず、右辺値はconst左辺値参照 `const T&` に束縛するよう扱われていた。 このconst左辺値参照では左辺値も束縛できるため、左辺値/右辺値の区別情報が失われてしまい、右辺値のみに対して特別な処理を記述することができなかった。 ```cpp @@ -54,7 +54,7 @@ v = vv; // 代入式1 v = std::vector(100, 0); // 代入式2 ``` -上記コードはC++03では、代入式1,2ともに右辺は `vector const&` 型に束縛される。 +上記コードはC++98では、代入式1,2ともに右辺は `vector const&` 型に束縛される。 代入処理の中では、右辺の値をコピーし、左辺の値と置き換えられる。 しかし代入式2の右辺は一時オブジェクトであり、直後に破棄されるため、一時オブジェクトをコピーすることは無駄といえる。 もし右辺値と左辺値を型を用いて区別できれば、右辺値の場合はコピーせず単に左辺と置き換えるといった処理が記述できる。 @@ -373,7 +373,7 @@ enumの列挙子などもこれにあたる。 ## この機能が必要になった背景・経緯 -ムーブセマンティクスは、C++03でもNRVO(特定の文脈でのコンストラクタの省略)や、 +ムーブセマンティクスは、C++98でもNRVO(特定の文脈でのコンストラクタの省略)や、 C++11で非推奨となった`std::auto_ptr`で実現されていた。 しかし、NRVOがいつでも機能するわけではなかった。 また、`std::auto_ptr`にはコピーと同じ文法でムーブしていることなど、問題が多かった。 diff --git a/lang/cpp11/scoped_enum.md b/lang/cpp11/scoped_enum.md index 7b712f5e3e..fce6078293 100644 --- a/lang/cpp11/scoped_enum.md +++ b/lang/cpp11/scoped_enum.md @@ -89,7 +89,7 @@ int main() ## この機能が必要になった背景・経緯 -C++03は、C99の列挙型に対する改善は提供していたが、依然として以下のような問題が残っていた: +C++98は、C99の列挙型に対する改善は提供していたが、依然として以下のような問題が残っていた: - 型の安全性 - 予期しないエラー(スコープがないことによる名前衝突、上記の型安全性の問題による予期しない型変換) diff --git a/lang/cpp11/sfinae_expressions.md b/lang/cpp11/sfinae_expressions.md index 3ec04a7ef9..df05e8bb37 100644 --- a/lang/cpp11/sfinae_expressions.md +++ b/lang/cpp11/sfinae_expressions.md @@ -14,7 +14,7 @@ たとえば、関数のシグニチャの一部として「`typename T::value_type`」が書いてあり、型`T`が`value_type`という型を持っていない場合、その関数がオーバーロード解決から除外される。これによって型が任意の機能を持っているかを、コンパイル時に判定できた。 -しかしC++03において、SFINAEによって「型`T`に関する任意の式が有効かどうかを判定できるか」は仕様として曖昧だった。C++11ではこの曖昧さが取り除かれ、任意の式が有効かどうかでSFINAEが処理されることとなった。 +しかしC++98において、SFINAEによって「型`T`に関する任意の式が有効かどうかを判定できるか」は仕様として曖昧だった。C++11ではこの曖昧さが取り除かれ、任意の式が有効かどうかでSFINAEが処理されることとなった。 ```cpp example #include diff --git a/lang/cpp11/user_defined_literals.md b/lang/cpp11/user_defined_literals.md index 376f518b26..6ea0d7a343 100644 --- a/lang/cpp11/user_defined_literals.md +++ b/lang/cpp11/user_defined_literals.md @@ -337,7 +337,7 @@ hello ユーザー定義型に関して、C++には基本的な設計原則がある: -1. ユーザー定義型は、組み込み型と同じ設備(facilities)をサポートできること。C++03では、組み込み型がもつ「リテラル」という機能を、ユーザー定義型に持たせることができなかった +1. ユーザー定義型は、組み込み型と同じ設備(facilities)をサポートできること。C++98では、組み込み型がもつ「リテラル」という機能を、ユーザー定義型に持たせることができなかった 2. C言語との互換性を維持する必要があるが、C99が持つ複素数リテラルを受け入れるための機能がない ユーザー定義型に対してリテラルを定義できるようにすることで、ユーザー定義型で可能な設計の範囲が増え、C言語が持つ複素数リテラルをC++の機能のなかで実現できるようになる。 diff --git a/lang/cpp14/sized_deallocation.md b/lang/cpp14/sized_deallocation.md index a59887556c..187d4e19ae 100644 --- a/lang/cpp14/sized_deallocation.md +++ b/lang/cpp14/sized_deallocation.md @@ -10,7 +10,7 @@ ## 概要 -C++03ではクラス用の`delete`演算子として、サイズをとるバージョンをオーバーロードできた。C++14では、それに対応するグローバルの`delete`演算子を定義できるようにする。 +C++98ではクラス用の`delete`演算子として、サイズをとるバージョンをオーバーロードできた。C++14では、それに対応するグローバルの`delete`演算子を定義できるようにする。 C++14では、オーバーロード可能なグローバルの`new`演算子、`delete`演算子として、以下を許可する: diff --git a/lang/cpp23/update_normative_reference_to_posix.md b/lang/cpp23/update_normative_reference_to_posix.md index d74744f46f..852504041f 100644 --- a/lang/cpp23/update_normative_reference_to_posix.md +++ b/lang/cpp23/update_normative_reference_to_posix.md @@ -27,7 +27,7 @@ C++20まではPOSIX規格としてISO/IEC 9945:2003 (POSIX.1-2001 別名 The Sin ここでは、具体的に問題になった、標準C++が参照するPOSIXの機能を列挙する。 ### errno -C++03まで、[``](/reference/cerrno.md)と``にはISO Cが要求する`EDOM` (定義域エラー)、`ERANGE` (値域エラー)、`errno`といった必要最低限のマクロのみが含まれていた。 +C++98まで、[``](/reference/cerrno.md)と``にはISO Cが要求する`EDOM` (定義域エラー)、`ERANGE` (値域エラー)、`errno`といった必要最低限のマクロのみが含まれていた。 C++11での[``](/reference/system_error.md)ライブラリの導入にともなって、「[``](/reference/cerrno.md)で定義される内容は、`errno`がマクロ定義されることを除いてPOSIXの``ヘッダと同じである」という規定となった。この規定のあとにマクロのリストが定義されるが、`ENOTRECOVERABLE`と`EOWNERDEAD`はPOSIXの2006規格、`ENOTSUP`と`EOPNOTSUPP`は2008規格で追加されたものだった。 diff --git a/reference/algorithm.md b/reference/algorithm.md index d585efa09b..ee407da8c2 100644 --- a/reference/algorithm.md +++ b/reference/algorithm.md @@ -298,9 +298,9 @@ ranges::sort(pv, {}, &Person::name); - 「区分化されている」と「ソートされている」との関係 あるシーケンスが比較関数 `comp` でソートされている場合、そのシーケンスは `comp` に任意の検索キー `k` を部分適用した式 `comp(e, k)` や `!comp(k, e)` などにより区分化されているともいえる。 例えば、ソートされた整数列 `[1, 5, 13, 17, 25]` は「 `10` より小さい」によって区分化されている。さらに、そのほかの任意の数値についても「~より小さい」あるいは「~より小さくない(~以上)」などによって区分化されているといえる。 - C++03 までの二分探索アルゴリズムは比較関数が狭義の弱順序となることおよび対象シーケンスがその比較関数でソートされていることを要求していた。しかしその後、 C++11 で異なる型のキーによる検索を明示的に許すために制限が見直された結果、比較関数そのものに対する要求はなくなり、比較関数に検索キーを部分適用した式による区分化のみに要求が緩められた。(参照: [LWG issue 270 "Binary search requirements overly strict"](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270) ) + C++98 までの二分探索アルゴリズムは比較関数が狭義の弱順序となることおよび対象シーケンスがその比較関数でソートされていることを要求していた。しかしその後、 C++11 で異なる型のキーによる検索を明示的に許すために制限が見直された結果、比較関数そのものに対する要求はなくなり、比較関数に検索キーを部分適用した式による区分化のみに要求が緩められた。(参照: [LWG issue 270 "Binary search requirements overly strict"](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270) ) これにより、例えばソートされていない整数列 `[5, 1, 25, 13, 17]` に対しても `10` をキーとして [`lower_bound()`](algorithm/lower_bound.md) を用いることにより `10` より小さい範囲の境界を取り出すことが可能になっている。しかし `15` をキーとすることは不正である。 - ただ、 C++03 の要件に合わない(特にソートされていない範囲に対する)二分探索を行いたい場合は、同じく C++11 で追加された [`partition_point()`](algorithm/partition_point.md) の使用も検討したほうがよい。 + ただ、 C++98 の要件に合わない(特にソートされていない範囲に対する)二分探索を行いたい場合は、同じく C++11 で追加された [`partition_point()`](algorithm/partition_point.md) の使用も検討したほうがよい。 順序関係を扱う関数の説明において、この節では安定性 (stability) のような考え方を説明するために同値性 (equivalence) の概念を頻繁に使う。 この節で参照する同値性は必ずしも `operator==` ではなく、[狭義の弱順序](/reference/algorithm.md#strict-weak-ordering)によって示される同値関係である。つまりそれは、2つの要素 `a` と `b` は `!(a < b) && !(b < a)` の時かつその時に限り同値とみなされるということである。 diff --git a/reference/algorithm/adjacent_find.md b/reference/algorithm/adjacent_find.md index 50b87f5544..e6887de5d9 100644 --- a/reference/algorithm/adjacent_find.md +++ b/reference/algorithm/adjacent_find.md @@ -8,7 +8,7 @@ namespace std { template ForwardIterator adjacent_find(ForwardIterator first, - ForwardIterator last); // (1) C++03 + ForwardIterator last); // (1) C++98 template constexpr ForwardIterator @@ -19,7 +19,7 @@ namespace std { ForwardIterator adjacent_find(ForwardIterator first, ForwardIterator last, - BinaryPredicate pred); // (2) C++03 + BinaryPredicate pred); // (2) C++98 template constexpr ForwardIterator diff --git a/reference/algorithm/binary_search.md b/reference/algorithm/binary_search.md index 6ce083c7b2..ff468c8088 100644 --- a/reference/algorithm/binary_search.md +++ b/reference/algorithm/binary_search.md @@ -10,7 +10,7 @@ namespace std { bool binary_search(ForwardIterator first, ForwardIterator last, - const T& value); // (1) C++03 + const T& value); // (1) C++98 template constexpr bool @@ -25,7 +25,7 @@ namespace std { binary_search(ForwardIterator first, ForwardIterator last, const T& value, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template @@ -170,7 +170,7 @@ bool binary_search(ForwardIterator first, ForwardIterator last, ## 参照 - [LWG Issue 787. complexity of `binary_search`](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#787) - - C++03までの計算量が間違っていたので、C++11で修正。 + - C++98までの計算量が間違っていたので、C++11で修正。 - [P0202R3 Add Constexpr Modifiers to Functions in `` and `` Headers](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0202r3.html) - [P2248R8 Enabling list-initialization for algorithms](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2248r8.html) - C++26で波カッコ初期化 (リスト初期化) に対応した diff --git a/reference/algorithm/copy.md b/reference/algorithm/copy.md index 1cce8b1805..c8b51469ac 100644 --- a/reference/algorithm/copy.md +++ b/reference/algorithm/copy.md @@ -9,7 +9,7 @@ namespace std { OutputIterator copy(InputIterator first, InputIterator last, - OutputIterator result); // (1) C++03 + OutputIterator result); // (1) C++98 template constexpr OutputIterator diff --git a/reference/algorithm/copy_backward.md b/reference/algorithm/copy_backward.md index 91e72f01f1..6f0521ae43 100644 --- a/reference/algorithm/copy_backward.md +++ b/reference/algorithm/copy_backward.md @@ -9,7 +9,7 @@ namespace std { BidirectionalIterator2 copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, - BidirectionalIterator2 result); // C++03 + BidirectionalIterator2 result); // C++98 template constexpr BidirectionalIterator2 diff --git a/reference/algorithm/count.md b/reference/algorithm/count.md index b2bf8502ab..9976a1b451 100644 --- a/reference/algorithm/count.md +++ b/reference/algorithm/count.md @@ -10,7 +10,7 @@ namespace std { typename iterator_traits::difference_type count(InputIterator first, InputIterator last, - const T& value); // (1) C++03 + const T& value); // (1) C++98 template constexpr typename iterator_traits::difference_type diff --git a/reference/algorithm/count_if.md b/reference/algorithm/count_if.md index 56181fd2c5..96246323f1 100644 --- a/reference/algorithm/count_if.md +++ b/reference/algorithm/count_if.md @@ -9,7 +9,7 @@ namespace std { typename iterator_traits::difference_type count_if(InputIterator first, InputIterator last, - Predicate pred); // (1) C++03 + Predicate pred); // (1) C++98 template constexpr typename iterator_traits::difference_type diff --git a/reference/algorithm/equal.md b/reference/algorithm/equal.md index 9ba94dc1dc..0ebdff3246 100644 --- a/reference/algorithm/equal.md +++ b/reference/algorithm/equal.md @@ -8,7 +8,7 @@ namespace std { template bool equal(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2); // (1) C++03 + InputIterator2 first2); // (1) C++98 template constexpr bool equal(InputIterator1 first1, @@ -19,7 +19,7 @@ namespace std { bool equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, - BinaryPredicate pred); // (2) C++03 + BinaryPredicate pred); // (2) C++98 template constexpr bool equal(InputIterator1 first1, diff --git a/reference/algorithm/equal_range.md b/reference/algorithm/equal_range.md index c7a2a6ed20..43021e0cfd 100644 --- a/reference/algorithm/equal_range.md +++ b/reference/algorithm/equal_range.md @@ -10,7 +10,7 @@ namespace std { pair equal_range(ForwardIterator first, ForwardIterator last, - const T& value); // (1) C++03 + const T& value); // (1) C++98 template constexpr pair @@ -31,7 +31,7 @@ namespace std { equal_range(ForwardIterator first, ForwardIterator last, const T& value, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template diff --git a/reference/algorithm/fill.md b/reference/algorithm/fill.md index c345c7dac5..ee0e2002ab 100644 --- a/reference/algorithm/fill.md +++ b/reference/algorithm/fill.md @@ -10,7 +10,7 @@ namespace std { void fill(ForwardIterator first, ForwardIterator last, - const T& value); // (1) C++03 + const T& value); // (1) C++98 template constexpr void diff --git a/reference/algorithm/fill_n.md b/reference/algorithm/fill_n.md index b89314d479..02524d1d2f 100644 --- a/reference/algorithm/fill_n.md +++ b/reference/algorithm/fill_n.md @@ -11,7 +11,7 @@ namespace std { void fill_n(OutputIterator first, Size n, - const T& value); // (1) C++03 + const T& value); // (1) C++98 template @@ -69,7 +69,7 @@ namespace std { ## 戻り値 -- C++03 まで +- C++98 まで 無し - C++11 から `n` が 1 以上の場合は `first + n`、そうでない場合は `first` を返す。 diff --git a/reference/algorithm/find.md b/reference/algorithm/find.md index e32bfe88c3..90280ad0a9 100644 --- a/reference/algorithm/find.md +++ b/reference/algorithm/find.md @@ -10,7 +10,7 @@ namespace std { InputIterator find(InputIterator first, InputIterator last, - const T& value); // (1) C++03 + const T& value); // (1) C++98 template constexpr InputIterator diff --git a/reference/algorithm/find_end.md b/reference/algorithm/find_end.md index 196d52b41a..d5f193db40 100644 --- a/reference/algorithm/find_end.md +++ b/reference/algorithm/find_end.md @@ -9,7 +9,7 @@ namespace std { ForwardIterator1 find_end(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, - ForwardIterator2 last2); // (1) C++03 + ForwardIterator2 last2); // (1) C++98 template constexpr ForwardIterator1 find_end(ForwardIterator1 first1, @@ -23,7 +23,7 @@ namespace std { ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred); // (2) C++03 + BinaryPredicate pred); // (2) C++98 template diff --git a/reference/algorithm/find_first_of.md b/reference/algorithm/find_first_of.md index b7fbfa8c4f..d4b3936fe7 100644 --- a/reference/algorithm/find_first_of.md +++ b/reference/algorithm/find_first_of.md @@ -10,7 +10,7 @@ namespace std { find_first_of(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, - ForwardIterator2 last2); // (1) C++03 + ForwardIterator2 last2); // (1) C++98 template InputIterator @@ -32,7 +32,7 @@ namespace std { ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred); // (2) C++03 + BinaryPredicate pred); // (2) C++98 template InputIterator diff --git a/reference/algorithm/find_if.md b/reference/algorithm/find_if.md index fcb6e1ec4f..611983b98f 100644 --- a/reference/algorithm/find_if.md +++ b/reference/algorithm/find_if.md @@ -8,7 +8,7 @@ namespace std { template InputIterator find_if(InputIterator first, InputIterator last, - Predicate pred); // (1) C++03 + Predicate pred); // (1) C++98 template constexpr InputIterator find_if(InputIterator first, diff --git a/reference/algorithm/for_each.md b/reference/algorithm/for_each.md index dc270b1726..5f846565bd 100644 --- a/reference/algorithm/for_each.md +++ b/reference/algorithm/for_each.md @@ -8,7 +8,7 @@ namespace std { template Function for_each(InputIterator first, InputIterator last, - Function f); // (1) C++03 + Function f); // (1) C++98 template constexpr Function for_each(InputIterator first, @@ -38,7 +38,7 @@ namespace std { ## 戻り値 -* C++03 の場合 : `f` +* C++98 の場合 : `f` * C++11 の場合 : `std::move(f)` @@ -53,7 +53,7 @@ namespace std { ## 例 -### C++03での例 +### C++98での例 ```cpp example #include #include diff --git a/reference/algorithm/generate.md b/reference/algorithm/generate.md index 5687804b6a..196c3bcec8 100644 --- a/reference/algorithm/generate.md +++ b/reference/algorithm/generate.md @@ -8,7 +8,7 @@ namespace std { template void generate(ForwardIterator first, ForwardIterator last, - Generator gen); // (1) C++03 + Generator gen); // (1) C++98 template constexpr void generate(ForwardIterator first, diff --git a/reference/algorithm/generate_n.md b/reference/algorithm/generate_n.md index 3dff93c499..add6a950c8 100644 --- a/reference/algorithm/generate_n.md +++ b/reference/algorithm/generate_n.md @@ -9,7 +9,7 @@ namespace std { void generate_n(OutputIterator first, Size n, - Generator gen); // (1) C++03 + Generator gen); // (1) C++98 template OutputIterator @@ -48,7 +48,7 @@ namespace std { ## 戻り値 -- C++03 まで +- C++98 まで 無し - C++11 から `n` が 1 以上の場合、`first + n` が返される。 diff --git a/reference/algorithm/includes.md b/reference/algorithm/includes.md index e32059813f..8c42cb7b30 100644 --- a/reference/algorithm/includes.md +++ b/reference/algorithm/includes.md @@ -9,7 +9,7 @@ namespace std { bool includes(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, - InputIterator2 last2); // (1) C++03 + InputIterator2 last2); // (1) C++98 template constexpr bool includes(InputIterator1 first1, @@ -22,7 +22,7 @@ namespace std { InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr bool includes(InputIterator1 first1, diff --git a/reference/algorithm/inplace_merge.md b/reference/algorithm/inplace_merge.md index 8b39ad9090..692d0a54b8 100644 --- a/reference/algorithm/inplace_merge.md +++ b/reference/algorithm/inplace_merge.md @@ -8,7 +8,7 @@ namespace std { template void inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, - BidirectionalIterator last); // (1) C++03 + BidirectionalIterator last); // (1) C++98 template constexpr void inplace_merge(BidirectionalIterator first, @@ -19,7 +19,7 @@ namespace std { void inplace_merge(BidirectionalIterator first, BidirectionalIterator middle, BidirectionalIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr void inplace_merge(BidirectionalIterator first, diff --git a/reference/algorithm/iter_swap.md b/reference/algorithm/iter_swap.md index 85f8cc5858..52cdd4f196 100644 --- a/reference/algorithm/iter_swap.md +++ b/reference/algorithm/iter_swap.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - void iter_swap(ForwardIterator1 a, ForwardIterator2 b); // (1) C++03 + void iter_swap(ForwardIterator1 a, ForwardIterator2 b); // (1) C++98 template constexpr void iter_swap(ForwardIterator1 a, ForwardIterator2 b); // (1) C++20 @@ -23,12 +23,12 @@ namespace std { ## 効果 -- C++03 : 2つのイテレータ`a`と`b`が指す値を入れ替える +- C++98 : 2つのイテレータ`a`と`b`が指す値を入れ替える - C++11 : [`swap`](/reference/utility/swap.md)`(*a, *b)` ## 備考 -C++03版の仕様は、以下の2点で問題があった: +C++98版の仕様は、以下の2点で問題があった: 1. `std::swap()`関数ではなく、汎用的な入れ替え操作を行うようにも読めるため、コンテナに特化した定数時間の入れ替え操作ではなく、線形時間の入れ替えが行われることを許可していた。 2. `std::vector::iterator`のような、参照のように動作するプロキシオブジェクトを指すイテレータを許可していなかった。 @@ -76,5 +76,5 @@ void iter_swap(ForwardIterator1 a, ForwardIterator2 b) { ## 参照 - [LWG Issue 187. `iter_swap` underspecified](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#187) - - C++03での効果を見直す経緯となったIssue + - C++98での効果を見直す経緯となったIssue - [P0879R0 Constexpr for `swap` and `swap` related functions](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0879r0.html) diff --git a/reference/algorithm/lexicographical_compare.md b/reference/algorithm/lexicographical_compare.md index 35096690cb..0437b5dc28 100644 --- a/reference/algorithm/lexicographical_compare.md +++ b/reference/algorithm/lexicographical_compare.md @@ -10,7 +10,7 @@ namespace std { InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, - InputIterator2 last2); // (1) C++03 + InputIterator2 last2); // (1) C++98 template constexpr bool lexicographical_compare( @@ -25,7 +25,7 @@ namespace std { InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr bool lexicographical_compare( diff --git a/reference/algorithm/lower_bound.md b/reference/algorithm/lower_bound.md index 25716af757..2ec9182f0a 100644 --- a/reference/algorithm/lower_bound.md +++ b/reference/algorithm/lower_bound.md @@ -10,7 +10,7 @@ namespace std { ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, - const T& value); // (1) C++03 + const T& value); // (1) C++98 template constexpr ForwardIterator @@ -31,7 +31,7 @@ namespace std { lower_bound(ForwardIterator first, ForwardIterator last, const T& value, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template @@ -58,7 +58,7 @@ namespace std { ## 要件 -- C++03 まで +- C++98 まで - `first`、`last` は前方向イテレータの要件を満たすこと。 - `comp` は 2 引数の関数オブジェクトで、結果の型は `bool` 型に変換可能であること。また、引数に非 `const` の関数を適用しないこと。 - `T` は `LessThanComparable` であること。 @@ -87,8 +87,8 @@ namespace std { - [`std::set`](/reference/set/set.md)や[`std::multiset`](/reference/set/multiset.md)に対しては専用の[`lower_bound`](/reference/set/set/lower_bound.md)メンバ関数が定義されているため、そちらを使用すること - 本関数は、本質的に C++11 で追加された [`partition_point`](partition_point.md) と等価である。 具体的には、[`partition_point`](partition_point.md)`(first, last, [value](const T& e) { return e < value; })`、あるいは、[`partition_point`](partition_point.md)`(first, last, [value, comp](const T& e) { return comp(e, value); })` とすることで等価の結果が得られる。 -- 本関数の要件は、上記の通り C++03 までの方が C++11 よりも厳しい。 - しかし、本アルゴリズムの特性上、処理系が C++03 までにしか準拠していない場合でも、昇順に並んでいなくても正常に動作する可能性は高いものと思われる。 +- 本関数の要件は、上記の通り C++98 までの方が C++11 よりも厳しい。 + しかし、本アルゴリズムの特性上、処理系が C++98 までにしか準拠していない場合でも、昇順に並んでいなくても正常に動作する可能性は高いものと思われる。 - (1), (2) : - C++26 : 引数として波カッコ初期化`{}`を受け付ける ```cpp diff --git a/reference/algorithm/make_heap.md b/reference/algorithm/make_heap.md index 0aa733f53e..ebc9030cc3 100644 --- a/reference/algorithm/make_heap.md +++ b/reference/algorithm/make_heap.md @@ -7,7 +7,7 @@ namespace std { template void make_heap(RandomAccessIterator first, - RandomAccessIterator last); // (1) C++03 + RandomAccessIterator last); // (1) C++98 template constexpr void make_heap(RandomAccessIterator first, @@ -16,7 +16,7 @@ namespace std { template void make_heap(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr void make_heap(RandomAccessIterator first, diff --git a/reference/algorithm/max.md b/reference/algorithm/max.md index 27d11bf562..60ee4d7fb4 100644 --- a/reference/algorithm/max.md +++ b/reference/algorithm/max.md @@ -6,13 +6,13 @@ ```cpp namespace std { template - const T& max(const T& a, const T& b); // (1) C++03 + const T& max(const T& a, const T& b); // (1) C++98 template constexpr const T& max(const T& a, const T& b); // (1) C++14 template - const T& max(const T& a, const T& b, Compare comp); // (2) C++03 + const T& max(const T& a, const T& b, Compare comp); // (2) C++98 template constexpr const T& max(const T& a, const T& b, Compare comp); // (2) C++14 diff --git a/reference/algorithm/max_element.md b/reference/algorithm/max_element.md index e8d4f7fb13..7a7664b2df 100644 --- a/reference/algorithm/max_element.md +++ b/reference/algorithm/max_element.md @@ -8,13 +8,13 @@ namespace std { template ForwardIterator max_element(ForwardIterator first, - ForwardIterator last); // (1) C++03 + ForwardIterator last); // (1) C++98 template ForwardIterator max_element(ForwardIterator first, ForwardIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template ForwardIterator diff --git a/reference/algorithm/merge.md b/reference/algorithm/merge.md index dfceec9d09..4ed8b52c2a 100644 --- a/reference/algorithm/merge.md +++ b/reference/algorithm/merge.md @@ -11,7 +11,7 @@ namespace std { InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, - OutputIterator result); // (1) C++03 + OutputIterator result); // (1) C++98 template constexpr OutputIterator @@ -29,7 +29,7 @@ namespace std { InputIterator2 first2, InputIterator2 last2, OutputIterator result, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template diff --git a/reference/algorithm/min.md b/reference/algorithm/min.md index 8ed16614b9..edd68ec58f 100644 --- a/reference/algorithm/min.md +++ b/reference/algorithm/min.md @@ -6,13 +6,13 @@ ```cpp namespace std { template - const T& min(const T& a, const T& b); // (1) C++03 + const T& min(const T& a, const T& b); // (1) C++98 template constexpr const T& min(const T& a, const T& b); // (1) C++14 template - const T& min(const T& a, const T& b, Compare comp); // (2) C++03 + const T& min(const T& a, const T& b, Compare comp); // (2) C++98 template constexpr const T& min(const T& a, const T& b, Compare comp); // (2) C++14 diff --git a/reference/algorithm/min_element.md b/reference/algorithm/min_element.md index 4568853024..844d952e98 100644 --- a/reference/algorithm/min_element.md +++ b/reference/algorithm/min_element.md @@ -8,13 +8,13 @@ namespace std { template ForwardIterator min_element(ForwardIterator first, - ForwardIterator last); // (1) C++03 + ForwardIterator last); // (1) C++98 template ForwardIterator min_element(ForwardIterator first, ForwardIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template ForwardIterator diff --git a/reference/algorithm/mismatch.md b/reference/algorithm/mismatch.md index ac0abd33f8..70da97f076 100644 --- a/reference/algorithm/mismatch.md +++ b/reference/algorithm/mismatch.md @@ -8,7 +8,7 @@ namespace std { template pair mismatch(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2); // (1) C++03 + InputIterator2 first2); // (1) C++98 template constexpr pair @@ -19,7 +19,7 @@ namespace std { class BinaryPredicate> pair mismatch(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, BinaryPredicate pred); // (2) C++03 + InputIterator2 first2, BinaryPredicate pred); // (2) C++98 template diff --git a/reference/algorithm/next_permutation.md b/reference/algorithm/next_permutation.md index 1eab03e29d..7e82e84b60 100644 --- a/reference/algorithm/next_permutation.md +++ b/reference/algorithm/next_permutation.md @@ -7,7 +7,7 @@ namespace std { template bool next_permutation(BidirectionalIterator first, - BidirectionalIterator last); // (1) C++03 + BidirectionalIterator last); // (1) C++98 template constexpr bool next_permutation(BidirectionalIterator first, @@ -16,7 +16,7 @@ namespace std { template bool next_permutation(BidirectionalIterator first, BidirectionalIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr bool next_permutation(BidirectionalIterator first, diff --git a/reference/algorithm/nth_element.md b/reference/algorithm/nth_element.md index fe4a9de502..603660c3ab 100644 --- a/reference/algorithm/nth_element.md +++ b/reference/algorithm/nth_element.md @@ -8,7 +8,7 @@ namespace std { template void nth_element(RandomAccessIterator first, RandomAccessIterator nth, - RandomAccessIterator last); // (1) C++03 + RandomAccessIterator last); // (1) C++98 template constexpr void nth_element(RandomAccessIterator first, @@ -19,7 +19,7 @@ namespace std { void nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr void nth_element(RandomAccessIterator first, diff --git a/reference/algorithm/partial_sort.md b/reference/algorithm/partial_sort.md index ce15542924..650b0bbb88 100644 --- a/reference/algorithm/partial_sort.md +++ b/reference/algorithm/partial_sort.md @@ -8,7 +8,7 @@ namespace std { template void partial_sort(RandomAccessIterator first, RandomAccessIterator middle, - RandomAccessIterator last); // (1) C++03 + RandomAccessIterator last); // (1) C++98 template constexpr void partial_sort(RandomAccessIterator first, @@ -19,7 +19,7 @@ namespace std { void partial_sort(RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr void partial_sort(RandomAccessIterator first, diff --git a/reference/algorithm/partial_sort_copy.md b/reference/algorithm/partial_sort_copy.md index e4014acfe7..8954a3ea8c 100644 --- a/reference/algorithm/partial_sort_copy.md +++ b/reference/algorithm/partial_sort_copy.md @@ -10,7 +10,7 @@ namespace std { partial_sort_copy(InputIterator first, InputIterator last, RandomAccessIterator result_first, - RandomAccessIterator result_last); // (1) C++03 + RandomAccessIterator result_last); // (1) C++98 template constexpr RandomAccessIterator @@ -25,7 +25,7 @@ namespace std { InputIterator last, RandomAccessIterator result_first, RandomAccessIterator result_last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr RandomAccessIterator diff --git a/reference/algorithm/partition.md b/reference/algorithm/partition.md index 0906277f5b..acda07d8ba 100644 --- a/reference/algorithm/partition.md +++ b/reference/algorithm/partition.md @@ -9,7 +9,7 @@ namespace std { BidirectionalIterator partition(BidirectionalIterator first, BidirectionalIterator last, - Predicate pred); // (1) C++03 + Predicate pred); // (1) C++98 template ForwardIterator @@ -37,7 +37,7 @@ namespace std { ## 要件 -- C++03 : `BidirectionalIterator` は `ValueSwappable` の要件を満たしている必要がある。 +- C++98 : `BidirectionalIterator` は `ValueSwappable` の要件を満たしている必要がある。 - C++11 : `ForwardIterator` は `ValueSwappable` の要件を満たしている必要がある。 ## 効果 diff --git a/reference/algorithm/pop_heap.md b/reference/algorithm/pop_heap.md index dd1ca84ddd..b258c000b3 100644 --- a/reference/algorithm/pop_heap.md +++ b/reference/algorithm/pop_heap.md @@ -7,7 +7,7 @@ namespace std { template void pop_heap(RandomAccessIterator first, - RandomAccessIterator last); // (1) C++03 + RandomAccessIterator last); // (1) C++98 template constexpr void pop_heap(RandomAccessIterator first, @@ -16,7 +16,7 @@ namespace std { template void pop_heap(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr void pop_heap(RandomAccessIterator first, diff --git a/reference/algorithm/prev_permutation.md b/reference/algorithm/prev_permutation.md index 5abd949c8d..96fe24ea58 100644 --- a/reference/algorithm/prev_permutation.md +++ b/reference/algorithm/prev_permutation.md @@ -7,7 +7,7 @@ namespace std { template bool prev_permutation(BidirectionalIterator first, - BidirectionalIterator last); // (1) C++03 + BidirectionalIterator last); // (1) C++98 template constexpr bool prev_permutation(BidirectionalIterator first, @@ -16,7 +16,7 @@ namespace std { template bool prev_permutation(BidirectionalIterator first, BidirectionalIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr bool prev_permutation(BidirectionalIterator first, diff --git a/reference/algorithm/push_heap.md b/reference/algorithm/push_heap.md index 67a095beb1..cfaff30176 100644 --- a/reference/algorithm/push_heap.md +++ b/reference/algorithm/push_heap.md @@ -7,7 +7,7 @@ namespace std { template void push_heap(RandomAccessIterator first, - RandomAccessIterator last); // (1) C++03 + RandomAccessIterator last); // (1) C++98 template constexpr void push_heap(RandomAccessIterator first, @@ -16,7 +16,7 @@ namespace std { template void push_heap(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr void push_heap(RandomAccessIterator first, diff --git a/reference/algorithm/random_shuffle.md b/reference/algorithm/random_shuffle.md index 401aba1379..732fc6366a 100644 --- a/reference/algorithm/random_shuffle.md +++ b/reference/algorithm/random_shuffle.md @@ -14,7 +14,7 @@ namespace std { template void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, - RandomNumberGenerator& rand); // (2) C++03 + RandomNumberGenerator& rand); // (2) C++98 template void random_shuffle(RandomAccessIterator first, diff --git a/reference/algorithm/remove.md b/reference/algorithm/remove.md index 8449bd0786..39bbbfaefa 100644 --- a/reference/algorithm/remove.md +++ b/reference/algorithm/remove.md @@ -10,7 +10,7 @@ namespace std { ForwardIterator remove(ForwardIterator first, ForwardIterator last, - const T& value); // (1) C++03 + const T& value); // (1) C++98 template constexpr ForwardIterator diff --git a/reference/algorithm/remove_copy.md b/reference/algorithm/remove_copy.md index ef2a302ee8..acfae0b634 100644 --- a/reference/algorithm/remove_copy.md +++ b/reference/algorithm/remove_copy.md @@ -12,7 +12,7 @@ namespace std { remove_copy(InputIterator first, InputIterator last, OutputIterator result, - const T& value); // (1) C++03 + const T& value); // (1) C++98 template diff --git a/reference/algorithm/remove_copy_if.md b/reference/algorithm/remove_copy_if.md index 413a92ff21..cc2dab9d18 100644 --- a/reference/algorithm/remove_copy_if.md +++ b/reference/algorithm/remove_copy_if.md @@ -10,7 +10,7 @@ namespace std { remove_copy_if(InputIterator first, InputIterator last, OutputIterator result, - Predicate pred); // (1) C++03 + Predicate pred); // (1) C++98 template constexpr OutputIterator diff --git a/reference/algorithm/remove_if.md b/reference/algorithm/remove_if.md index 9ec8e63d19..0ca2990257 100644 --- a/reference/algorithm/remove_if.md +++ b/reference/algorithm/remove_if.md @@ -9,7 +9,7 @@ namespace std { ForwardIterator remove_if(ForwardIterator first, ForwardIterator last, - Predicate pred); // (1) C++03 + Predicate pred); // (1) C++98 template constexpr ForwardIterator diff --git a/reference/algorithm/replace.md b/reference/algorithm/replace.md index 998b1ffe08..51e39a9aeb 100644 --- a/reference/algorithm/replace.md +++ b/reference/algorithm/replace.md @@ -11,7 +11,7 @@ namespace std { replace(ForwardIterator first, ForwardIterator last, const T& old_value, - const T& new_value); // (1) C++03 + const T& new_value); // (1) C++98 template constexpr void diff --git a/reference/algorithm/replace_copy.md b/reference/algorithm/replace_copy.md index 62303f27a9..ed7f73e483 100644 --- a/reference/algorithm/replace_copy.md +++ b/reference/algorithm/replace_copy.md @@ -11,7 +11,7 @@ namespace std { InputIterator last, OutputIterator result, const T& old_value, - const T& new_value); // (1) C++03 + const T& new_value); // (1) C++98 template constexpr OutputIterator diff --git a/reference/algorithm/replace_copy_if.md b/reference/algorithm/replace_copy_if.md index c1136b7570..392293bf94 100644 --- a/reference/algorithm/replace_copy_if.md +++ b/reference/algorithm/replace_copy_if.md @@ -14,7 +14,7 @@ namespace std { InputIterator last, OutputIterator result, Predicate pred, - const T& new_value); // (1) C++03 + const T& new_value); // (1) C++98 template diff --git a/reference/algorithm/reverse.md b/reference/algorithm/reverse.md index 15bbb5379b..747a88e7aa 100644 --- a/reference/algorithm/reverse.md +++ b/reference/algorithm/reverse.md @@ -7,7 +7,7 @@ namespace std { template void reverse(BidirectionalIterator first, - BidirectionalIterator last); // (1) C++03 + BidirectionalIterator last); // (1) C++98 template constexpr void reverse(BidirectionalIterator first, diff --git a/reference/algorithm/reverse_copy.md b/reference/algorithm/reverse_copy.md index 8b5eab01ec..d475fba559 100644 --- a/reference/algorithm/reverse_copy.md +++ b/reference/algorithm/reverse_copy.md @@ -9,7 +9,7 @@ namespace std { OutputIterator reverse_copy(BidirectionalIterator first, BidirectionalIterator last, - OutputIterator result); // (1) C++03 + OutputIterator result); // (1) C++98 template constexpr OutputIterator diff --git a/reference/algorithm/rotate.md b/reference/algorithm/rotate.md index 0d3a68fa81..7982474e01 100644 --- a/reference/algorithm/rotate.md +++ b/reference/algorithm/rotate.md @@ -9,7 +9,7 @@ namespace std { void rotate(ForwardIterator first, ForwardIterator middle, - ForwardIterator last); // (1) C++03 + ForwardIterator last); // (1) C++98 template ForwardIterator @@ -50,7 +50,7 @@ namespace std { ## 戻り値 -- C++03 まで +- C++98 まで 無し - C++11 から 回転前の先頭の要素を指すイテレータ`first + (last - middle)` diff --git a/reference/algorithm/rotate_copy.md b/reference/algorithm/rotate_copy.md index 968b2a4cca..2eb4400d1b 100644 --- a/reference/algorithm/rotate_copy.md +++ b/reference/algorithm/rotate_copy.md @@ -10,7 +10,7 @@ namespace std { rotate_copy(ForwardIterator first, ForwardIterator middle, ForwardIterator last, - OutputIterator result); // (1) C++03 + OutputIterator result); // (1) C++98 template constexpr OutputIterator diff --git a/reference/algorithm/search.md b/reference/algorithm/search.md index 518e43b535..924fd6edb9 100644 --- a/reference/algorithm/search.md +++ b/reference/algorithm/search.md @@ -10,7 +10,7 @@ namespace std { search(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, - ForwardIterator2 last2); // (1) C++03 + ForwardIterator2 last2); // (1) C++98 template constexpr ForwardIterator1 @@ -25,7 +25,7 @@ namespace std { ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred); // (2) C++03 + BinaryPredicate pred); // (2) C++98 template constexpr ForwardIterator1 diff --git a/reference/algorithm/search_n.md b/reference/algorithm/search_n.md index 7d1f70ffce..e4e9260b26 100644 --- a/reference/algorithm/search_n.md +++ b/reference/algorithm/search_n.md @@ -12,7 +12,7 @@ namespace std { search_n(ForwardIterator first, ForwardIterator last, Size count, - const T& value); // (1) C++03 + const T& value); // (1) C++98 template @@ -39,7 +39,7 @@ namespace std { ForwardIterator last, Size count, const T& value, - BinaryPredicate pred); // (2) C++03 + BinaryPredicate pred); // (2) C++98 template constexpr OutputIterator @@ -29,7 +29,7 @@ namespace std { InputIterator2 first2, InputIterator2 last2, OutputIterator result, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template diff --git a/reference/algorithm/set_intersection.md b/reference/algorithm/set_intersection.md index 5470a9068c..880b414ea5 100644 --- a/reference/algorithm/set_intersection.md +++ b/reference/algorithm/set_intersection.md @@ -11,7 +11,7 @@ namespace std { InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, - OutputIterator result); // (1) C++03 + OutputIterator result); // (1) C++98 template constexpr OutputIterator @@ -29,7 +29,7 @@ namespace std { InputIterator2 first2, InputIterator2 last2, OutputIterator result, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template diff --git a/reference/algorithm/set_symmetric_difference.md b/reference/algorithm/set_symmetric_difference.md index ce7e0a8ba3..d11afeacaa 100644 --- a/reference/algorithm/set_symmetric_difference.md +++ b/reference/algorithm/set_symmetric_difference.md @@ -12,7 +12,7 @@ namespace std { InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, - OutputIterator result); // (1) C++03 + OutputIterator result); // (1) C++98 template @@ -31,7 +31,7 @@ namespace std { InputIterator2 first2, InputIterator2 last2, OutputIterator result, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template diff --git a/reference/algorithm/set_union.md b/reference/algorithm/set_union.md index 1a2ca583c5..43ee8a2afd 100644 --- a/reference/algorithm/set_union.md +++ b/reference/algorithm/set_union.md @@ -11,7 +11,7 @@ namespace std { InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, - OutputIterator result); // (1) C++03 + OutputIterator result); // (1) C++98 template constexpr OutputIterator @@ -29,7 +29,7 @@ namespace std { InputIterator2 first2, InputIterator2 last2, OutputIterator result, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template diff --git a/reference/algorithm/sort.md b/reference/algorithm/sort.md index b5022f5b79..d1ee082138 100644 --- a/reference/algorithm/sort.md +++ b/reference/algorithm/sort.md @@ -7,7 +7,7 @@ namespace std { template void sort(RandomAccessIterator first, - RandomAccessIterator last); // (1) C++03 + RandomAccessIterator last); // (1) C++98 template constexpr void sort(RandomAccessIterator first, @@ -16,7 +16,7 @@ namespace std { template void sort(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr void sort(RandomAccessIterator first, @@ -53,14 +53,14 @@ namespace std { ## 計算量 -- C++03: 平均して約N log N (N == `last - first`) 回の比較 +- C++98: 平均して約N log N (N == `last - first`) 回の比較 - C++11以降: O(N log N) (N == `last - first`) 回の比較 ## 備考 - この関数には、特定のアルゴリズムで実装すべきという規定はない - 実装のアルゴリズムとしては、クイックソートの改良版であるイントロソートが使われることが多い -- クイックソートは平均計算量がO(N log N)だが、最悪計算量がO(n2)である。そのため、C++03の計算量要件には合致するが、C++11の要件には合致しない +- クイックソートは平均計算量がO(N log N)だが、最悪計算量がO(n2)である。そのため、C++98の計算量要件には合致するが、C++11の要件には合致しない ## 例 diff --git a/reference/algorithm/sort_heap.md b/reference/algorithm/sort_heap.md index 95ce099978..6639363437 100644 --- a/reference/algorithm/sort_heap.md +++ b/reference/algorithm/sort_heap.md @@ -7,7 +7,7 @@ namespace std { template void sort_heap(RandomAccessIterator first, - RandomAccessIterator last); // (1) C++03 + RandomAccessIterator last); // (1) C++98 template constexpr void sort_heap(RandomAccessIterator first, @@ -16,7 +16,7 @@ namespace std { template void sort_heap(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr void sort_heap(RandomAccessIterator first, diff --git a/reference/algorithm/stable_partition.md b/reference/algorithm/stable_partition.md index 1f56fb03ca..21dabc3cfe 100644 --- a/reference/algorithm/stable_partition.md +++ b/reference/algorithm/stable_partition.md @@ -9,7 +9,7 @@ namespace std { BidirectionalIterator stable_partition(BidirectionalIterator first, BidirectionalIterator last, - Predicate pred); // (1) C++03 + Predicate pred); // (1) C++98 template constexpr BidirectionalIterator stable_partition(BidirectionalIterator first, diff --git a/reference/algorithm/stable_sort.md b/reference/algorithm/stable_sort.md index c4b945e1e5..3dcefbb701 100644 --- a/reference/algorithm/stable_sort.md +++ b/reference/algorithm/stable_sort.md @@ -7,7 +7,7 @@ namespace std { template void stable_sort(RandomAccessIterator first, - RandomAccessIterator last); // (1) C++03 + RandomAccessIterator last); // (1) C++98 template constexpr void stable_sort(RandomAccessIterator first, @@ -16,7 +16,7 @@ namespace std { template void stable_sort(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template constexpr void stable_sort(RandomAccessIterator first, diff --git a/reference/algorithm/swap_ranges.md b/reference/algorithm/swap_ranges.md index 027c306773..31a21044d7 100644 --- a/reference/algorithm/swap_ranges.md +++ b/reference/algorithm/swap_ranges.md @@ -9,7 +9,7 @@ namespace std { ForwardIterator2 swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2); // (1) C++03 + ForwardIterator2 first2); // (1) C++98 template constexpr ForwardIterator2 diff --git a/reference/algorithm/transform.md b/reference/algorithm/transform.md index d7fcc26e07..86dada3eba 100644 --- a/reference/algorithm/transform.md +++ b/reference/algorithm/transform.md @@ -10,7 +10,7 @@ namespace std { transform(InputIterator first, InputIterator last, OutputIterator result, - UnaryOperation op); // (1) C++03 + UnaryOperation op); // (1) C++98 template constexpr OutputIterator @@ -26,7 +26,7 @@ namespace std { InputIterator1 last1, InputIterator2 first2, OutputIterator result, - BinaryOperation binary_op); // (2) C++03 + BinaryOperation binary_op); // (2) C++98 template diff --git a/reference/algorithm/unique.md b/reference/algorithm/unique.md index 39967d5902..22680e15ba 100644 --- a/reference/algorithm/unique.md +++ b/reference/algorithm/unique.md @@ -8,7 +8,7 @@ namespace std { template ForwardIterator unique(ForwardIterator first, - ForwardIterator last); // (1) C++03 + ForwardIterator last); // (1) C++98 template constexpr ForwardIterator @@ -19,7 +19,7 @@ namespace std { ForwardIterator unique(ForwardIterator first, ForwardIterator last, - BinaryPredicate pred); // (2) C++03 + BinaryPredicate pred); // (2) C++98 template constexpr ForwardIterator diff --git a/reference/algorithm/unique_copy.md b/reference/algorithm/unique_copy.md index 79e5602c3d..59e2657dc1 100644 --- a/reference/algorithm/unique_copy.md +++ b/reference/algorithm/unique_copy.md @@ -9,7 +9,7 @@ namespace std { OutputIterator unique_copy(InputIterator first, InputIterator last, - OutputIterator result); // (1) C++03 + OutputIterator result); // (1) C++98 template constexpr OutputIterator @@ -23,7 +23,7 @@ namespace std { unique_copy(InputIterator first, InputIterator last, OutputIterator result, - BinaryPredicate pred); // (2) C++03 + BinaryPredicate pred); // (2) C++98 template diff --git a/reference/algorithm/upper_bound.md b/reference/algorithm/upper_bound.md index c4ffe7cc4b..4ef73abec8 100644 --- a/reference/algorithm/upper_bound.md +++ b/reference/algorithm/upper_bound.md @@ -10,7 +10,7 @@ namespace std { ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, - const T& value); // (1) C++03 + const T& value); // (1) C++98 template constexpr ForwardIterator @@ -31,7 +31,7 @@ namespace std { upper_bound(ForwardIterator first, ForwardIterator last, const T& value, - Compare comp); // (2) C++03 + Compare comp); // (2) C++98 template @@ -56,7 +56,7 @@ namespace std { ## 要件 -- C++03 まで +- C++98 まで - `first`、`last` は前方向イテレータの要件を満たすこと。 - `comp` は 2 引数の関数オブジェクトで、結果の型は `bool` 型に変換可能であること。また、引数に非 `const` の関数を適用しないこと。 - `T` は `LessThanComparable` であること。 @@ -84,8 +84,8 @@ namespace std { ## 備考 - 本関数は、本質的に C++11 で追加された [`partition_point`](partition_point.md) と等価である。 具体的には、[`partition_point`](partition_point.md)`(first, last, [value](const T& e) { return !bool(value < e); })`、あるいは、[`partition_point`](partition_point.md)`(first, last, [value, comp](const T& e) { return !bool(comp(value, e)); })` とすることで等価の結果が得られる。 -- 本関数の要件は、上記の通り C++03 までの方が C++11 よりも厳しい。 - しかし、本アルゴリズムの特性上、処理系が C++03 までにしか準拠していない場合でも、昇順に並んでいなくても正常に動作する可能性は高いものと思われる。 +- 本関数の要件は、上記の通り C++98 までの方が C++11 よりも厳しい。 + しかし、本アルゴリズムの特性上、処理系が C++98 までにしか準拠していない場合でも、昇順に並んでいなくても正常に動作する可能性は高いものと思われる。 - (1), (2) : - C++26 : 引数として波カッコ初期化`{}`を受け付ける ```cpp diff --git a/reference/bitset/bitset/any.md b/reference/bitset/bitset/any.md index f3a58acf28..c919a3378b 100644 --- a/reference/bitset/bitset/any.md +++ b/reference/bitset/bitset/any.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool any() const; // (1) C++03 +bool any() const; // (1) C++98 bool any() const noexcept; // (1) C++11 constexpr bool any() const noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/count.md b/reference/bitset/bitset/count.md index 94be6ffa56..85eaa08c18 100644 --- a/reference/bitset/bitset/count.md +++ b/reference/bitset/bitset/count.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_t count() const; // (1) C++03 +size_t count() const; // (1) C++98 size_t count() const noexcept; // (1) C++11 constexpr size_t count() const noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/flip.md b/reference/bitset/bitset/flip.md index a340f74e7b..6d27f34de5 100644 --- a/reference/bitset/bitset/flip.md +++ b/reference/bitset/bitset/flip.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -bitset& flip(); // (1) C++03 +bitset& flip(); // (1) C++98 bitset& flip() noexcept; // (1) C++11 constexpr bitset& flip() noexcept; // (1) C++23 -bitset& flip(size_t pos); // (2) C++03 +bitset& flip(size_t pos); // (2) C++98 constexpr bitset& flip(size_t pos); // (2) C++23 ``` diff --git a/reference/bitset/bitset/none.md b/reference/bitset/bitset/none.md index 8c2dce68d8..cae1004f48 100644 --- a/reference/bitset/bitset/none.md +++ b/reference/bitset/bitset/none.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool none() const; // (1) C++03 +bool none() const; // (1) C++98 bool none() const noexcept; // (1) C++11 constexpr bool none() const noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/op_and.md b/reference/bitset/bitset/op_and.md index 23b9fedffd..9d0323fa70 100644 --- a/reference/bitset/bitset/op_and.md +++ b/reference/bitset/bitset/op_and.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bitset operator&(const bitset& lhs, const bitset& rhs); // (1) C++03 + bitset operator&(const bitset& lhs, const bitset& rhs); // (1) C++98 template bitset operator&(const bitset& lhs, const bitset& rhs) noexcept; // (1) C++11 diff --git a/reference/bitset/bitset/op_and_assign.md b/reference/bitset/bitset/op_and_assign.md index a1671426b6..45e1838db5 100644 --- a/reference/bitset/bitset/op_and_assign.md +++ b/reference/bitset/bitset/op_and_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bitset& operator&=(const bitset& rhs); // (1) C++03 +bitset& operator&=(const bitset& rhs); // (1) C++98 bitset& operator&=(const bitset& rhs) noexcept; // (1) C++11 constexpr bitset& operator&=(const bitset& rhs) noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/op_at.md b/reference/bitset/bitset/op_at.md index 12a0cbc6cc..667e53ae1e 100644 --- a/reference/bitset/bitset/op_at.md +++ b/reference/bitset/bitset/op_at.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -bool operator[](size_t pos) const; // (1) C++03 +bool operator[](size_t pos) const; // (1) C++98 constexpr bool operator[](size_t pos) const; // (1) C++11 -reference operator[](size_t pos); // (2) C++03 +reference operator[](size_t pos); // (2) C++98 constexpr reference operator[](size_t pos); // (2) C++23 ``` * reference[link reference.md] diff --git a/reference/bitset/bitset/op_constructor.md b/reference/bitset/bitset/op_constructor.md index 0bce40e1ac..20244684c0 100644 --- a/reference/bitset/bitset/op_constructor.md +++ b/reference/bitset/bitset/op_constructor.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -bitset(); // (1) C++03 +bitset(); // (1) C++98 constexpr bitset() noexcept; // (1) C++11 -bitset(unsigned long val); // (2) C++03 +bitset(unsigned long val); // (2) C++98 constexpr bitset(unsigned long long val) noexcept; // (2) C++11 template @@ -16,7 +16,7 @@ explicit bitset( const basic_string& str, typename basic_string::size_type pos = 0, typename basic_string::size_type n = - basic_string::npos); // (3) C++03 + basic_string::npos); // (3) C++98 template explicit bitset( const basic_string& str, @@ -86,7 +86,7 @@ constexpr explicit bitset( - (2) : 整数値`val`でビット列を初期化する。`bitset`クラスのテンプレートパラメータ`N`と`val`のビット数のうち、小さい方の大きさで表現可能なビット列となる。クラステンプレートパラメータ`N`よりも`val`のビット数の方が小さい場合は、残りのビットを`0`で初期化する。 - (3), (4) : 文字列`str`でビット列を初期化する。 - ビット列として扱う文字列は`str`の`pos`文字目以降の最大`n`文字である。`n == npos`の場合は`pos`文字目以降の全体を使用する。対象となる文字列範囲を`rstr`とする。 - - C++03 : 文字列`rstr`に含まれる文字`CharT('0')`をビット値`0`、文字`CharT('1')`をビット値`1`と見なし、対応する値でビット列を構築する。 + - C++98 : 文字列`rstr`に含まれる文字`CharT('0')`をビット値`0`、文字`CharT('1')`をビット値`1`と見なし、対応する値でビット列を構築する。 - C++11 : 文字列`rstr`に含まれる文字`zero`をビット値`0`、文字`one`をビット値`1`と見なし、対応する値でビット列を構築する。 - クラステンプレートパラメータ`N`と文字列`rstr`の長さのうち、小さい方の大きさで表現可能なビット列となる。クラステンプレートパラメータ`N`よりも文字列`rstr`の長さの方が小さい場合は、残りのビットを`0`で初期化する。 - (5) : 以下のように初期化する: @@ -101,7 +101,7 @@ bitset( ## 例外 - (3), (4) : `pos > str.`[`size()`](/reference/string/basic_string/size.md)の場合、[`out_of_range`](/reference/stdexcept.md)例外を送出する。 - - C++03 : `str`に`'0'`と`'1'`以外の文字が含まれていた場合、[`invalid_argument`](/reference/stdexcept.md)例外を送出する。 + - C++98 : `str`に`'0'`と`'1'`以外の文字が含まれていた場合、[`invalid_argument`](/reference/stdexcept.md)例外を送出する。 - C++11 : `str`に`zero`と`one`以外の文字が含まれていた場合、[`invalid_argument`](/reference/stdexcept.md)例外を送出する。 - (5) : `str`に`zero`と`one`以外の文字が含まれていた場合、[`invalid_argument`](/reference/stdexcept.md)例外を送出する。 diff --git a/reference/bitset/bitset/op_equal.md b/reference/bitset/bitset/op_equal.md index 675ed0c7b4..daf8956119 100644 --- a/reference/bitset/bitset/op_equal.md +++ b/reference/bitset/bitset/op_equal.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool operator==(const bitset& rhs) const; // (1) C++03 +bool operator==(const bitset& rhs) const; // (1) C++98 bool operator==(const bitset& rhs) const noexcept; // (1) C++11 constexpr bool operator==(const bitset& rhs) const noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/op_flip.md b/reference/bitset/bitset/op_flip.md index f4ad3c9c49..e8e52f1ead 100644 --- a/reference/bitset/bitset/op_flip.md +++ b/reference/bitset/bitset/op_flip.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bitset operator~() const; // (1) C++03 +bitset operator~() const; // (1) C++98 bitset operator~() const noexcept; // (1) C++11 constexpr bitset operator~() const noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/op_istream.md b/reference/bitset/bitset/op_istream.md index f408c32951..6f27a2e6e4 100644 --- a/reference/bitset/bitset/op_istream.md +++ b/reference/bitset/bitset/op_istream.md @@ -24,7 +24,7 @@ namespace std { 1文字も入力が行われなかった場合の[`ios_base`](/reference/ios/ios_base.md)`::failbit`の設定は、バージョンによって以下のように異なる: -- C++03 : 1文字も入力が行われなかった場合、`failbit`を設定する +- C++98 : 1文字も入力が行われなかった場合、`failbit`を設定する - C++20 : `N > 0`かつ1文字も入力が行われなかった場合に、`failbit`を設定する(`bitset<0>`に対する入力が常に失敗してしまう問題への対処) - C++23 : `N > 0`かつ1文字も入力が行われなかった場合に、ローカルエラー状態へ`failbit`を設定する diff --git a/reference/bitset/bitset/op_left_shift.md b/reference/bitset/bitset/op_left_shift.md index 517b45125a..a84e40a249 100644 --- a/reference/bitset/bitset/op_left_shift.md +++ b/reference/bitset/bitset/op_left_shift.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bitset operator<<(size_t pos) const; // (1) C++03 +bitset operator<<(size_t pos) const; // (1) C++98 bitset operator<<(size_t pos) const noexcept; // (1) C++11 constexpr bitset operator<<(size_t pos) const noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/op_left_shift_assign.md b/reference/bitset/bitset/op_left_shift_assign.md index 056dc43bcd..4256431034 100644 --- a/reference/bitset/bitset/op_left_shift_assign.md +++ b/reference/bitset/bitset/op_left_shift_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bitset& operator<<=(size_t pos); // (1) C++03 +bitset& operator<<=(size_t pos); // (1) C++98 bitset& operator<<=(size_t pos) noexcept; // (1) C++11 constexpr bitset& operator<<=(size_t pos) noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/op_not_equal.md b/reference/bitset/bitset/op_not_equal.md index df548f1c57..bebe7ffd30 100644 --- a/reference/bitset/bitset/op_not_equal.md +++ b/reference/bitset/bitset/op_not_equal.md @@ -6,7 +6,7 @@ ```cpp // operator==により、以下のオーバーロードが使用可能になる (C++20) -bool operator!=(const bitset& rhs) const; // (1) C++03 +bool operator!=(const bitset& rhs) const; // (1) C++98 bool operator!=(const bitset& rhs) const noexcept; // (1) C++11 constexpr bool operator!=(const bitset& rhs) const noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/op_or.md b/reference/bitset/bitset/op_or.md index 9bb3cc2e7d..249ef6a668 100644 --- a/reference/bitset/bitset/op_or.md +++ b/reference/bitset/bitset/op_or.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bitset operator|(const bitset& lhs, const bitset& rhs); // (1) C++03 + bitset operator|(const bitset& lhs, const bitset& rhs); // (1) C++98 template bitset operator|(const bitset& lhs, const bitset& rhs) noexcept; // (1) C++11 diff --git a/reference/bitset/bitset/op_or_assign.md b/reference/bitset/bitset/op_or_assign.md index 2dcd663e06..cef3038c1f 100644 --- a/reference/bitset/bitset/op_or_assign.md +++ b/reference/bitset/bitset/op_or_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bitset& operator|=(const bitset& rhs); // (1) C++03 +bitset& operator|=(const bitset& rhs); // (1) C++98 bitset& operator|=(const bitset& rhs) noexcept; // (1) C++11 constexpr bitset& operator|=(const bitset& rhs) noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/op_right_shift.md b/reference/bitset/bitset/op_right_shift.md index b3aa2263ec..8047940abb 100644 --- a/reference/bitset/bitset/op_right_shift.md +++ b/reference/bitset/bitset/op_right_shift.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bitset operator>>(size_t pos) const; // (1) C++03 +bitset operator>>(size_t pos) const; // (1) C++98 bitset operator>>(size_t pos) const noexcept; // (1) C++11 constexpr bitset operator>>(size_t pos) const noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/op_right_shift_assign.md b/reference/bitset/bitset/op_right_shift_assign.md index cb47218962..9e54d79a7b 100644 --- a/reference/bitset/bitset/op_right_shift_assign.md +++ b/reference/bitset/bitset/op_right_shift_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bitset& operator>>=(size_t pos); // (1) C++03 +bitset& operator>>=(size_t pos); // (1) C++98 bitset& operator>>=(size_t pos) noexcept; // (1) C++11 constexpr bitset& operator>>=(size_t pos) noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/op_xor.md b/reference/bitset/bitset/op_xor.md index 36f622fe1e..8b82791439 100644 --- a/reference/bitset/bitset/op_xor.md +++ b/reference/bitset/bitset/op_xor.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bitset operator^(const bitset& lhs, const bitset& rhs); // (1) C++03 + bitset operator^(const bitset& lhs, const bitset& rhs); // (1) C++98 template bitset operator^(const bitset& lhs, const bitset& rhs) noexcept; // (1) C++11 diff --git a/reference/bitset/bitset/op_xor_assign.md b/reference/bitset/bitset/op_xor_assign.md index b6091b5a73..f42c8e069d 100644 --- a/reference/bitset/bitset/op_xor_assign.md +++ b/reference/bitset/bitset/op_xor_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bitset& operator^=(const bitset& rhs); // (1) C++03 +bitset& operator^=(const bitset& rhs); // (1) C++98 bitset& operator^=(const bitset& rhs) noexcept; // (1) C++11 constexpr bitset& operator^=(const bitset& rhs) noexcept; // (1) C++23 ``` diff --git a/reference/bitset/bitset/reset.md b/reference/bitset/bitset/reset.md index 66e5de4a6d..671fd407f3 100644 --- a/reference/bitset/bitset/reset.md +++ b/reference/bitset/bitset/reset.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -bitset& reset(); // (1) C++03 +bitset& reset(); // (1) C++98 bitset& reset() noexcept; // (1) C++11 constexpr bitset& reset() noexcept; // (1) C++23 -bitset& reset(size_t pos); // (2) C++03 +bitset& reset(size_t pos); // (2) C++98 constexpr bitset& reset(size_t pos); // (2) C++23 ``` diff --git a/reference/bitset/bitset/set.md b/reference/bitset/bitset/set.md index 9b41a8dbcb..c0e270d375 100644 --- a/reference/bitset/bitset/set.md +++ b/reference/bitset/bitset/set.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -bitset& set(); // (1) C++03 +bitset& set(); // (1) C++98 bitset& set() noexcept; // (1) C++11 constexpr bitset& set() noexcept; // (1) C++23 -bitset& set(size_t pos, bool val = true); // (2) C++03 +bitset& set(size_t pos, bool val = true); // (2) C++98 constexpr bitset& set(size_t pos, bool val = true); // (2) C++23 ``` diff --git a/reference/bitset/bitset/size.md b/reference/bitset/bitset/size.md index b3c58ac786..859211a799 100644 --- a/reference/bitset/bitset/size.md +++ b/reference/bitset/bitset/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_t size() const; // (1) C++03 +size_t size() const; // (1) C++98 constexpr size_t size() noexcept; // (1) C++11 constexpr size_t size() const noexcept; // (1) C++14 ``` diff --git a/reference/bitset/bitset/test.md b/reference/bitset/bitset/test.md index 544fe980fb..63111b23f3 100644 --- a/reference/bitset/bitset/test.md +++ b/reference/bitset/bitset/test.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool test(size_t pos) const; // (1) C++03 +bool test(size_t pos) const; // (1) C++98 constexpr bool test(size_t pos) const; // (1) C++23 ``` diff --git a/reference/bitset/bitset/to_string.md b/reference/bitset/bitset/to_string.md index 63e5c3b2d0..ceb1293740 100644 --- a/reference/bitset/bitset/to_string.md +++ b/reference/bitset/bitset/to_string.md @@ -6,7 +6,7 @@ ```cpp template -basic_string to_string() const; // (1) C++03 +basic_string to_string() const; // (1) C++98 template , @@ -29,7 +29,7 @@ constexpr basic_string ## 戻り値 1. `bitset`クラスのテンプレートパラメータ`N`の長さの`basic_string`オブジェクトを構築する。 2. 各ビットを文字表現に変換する - - C++03 : ビット値0は文字`CharT(0)`に、ビット値1は文字`CharT(1)`に変換。 + - C++98 : ビット値0は文字`CharT(0)`に、ビット値1は文字`CharT(1)`に変換。 - C++11 : ビット値0はパラメータ`zero`の文字に、ビット値1はパラメータ`one`に変換。 3. 各ビットの文字表現を、構築した`basic_string`オブジェクトに順番に設定して返す。 @@ -44,7 +44,7 @@ int main() { std::bitset<8> bs(131uL); - // C++03版の使用法 + // C++98版の使用法 std::string s1 = bs.to_string, std::allocator>(); std::cout << s1 << std::endl; @@ -62,7 +62,7 @@ int main() ## 備考 -- Visual C++、GCC(libstdc++)には、C++03でも`bs.to_string()`のように簡単に使用するための独自実装が追加で導入されていた。 +- Visual C++、GCC(libstdc++)には、C++98でも`bs.to_string()`のように簡単に使用するための独自実装が追加で導入されていた。 ## 参照 diff --git a/reference/bitset/bitset/to_ulong.md b/reference/bitset/bitset/to_ulong.md index 2b0d44b62d..d975062906 100644 --- a/reference/bitset/bitset/to_ulong.md +++ b/reference/bitset/bitset/to_ulong.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -unsigned long to_ulong() const; // (1) C++03 +unsigned long to_ulong() const; // (1) C++98 constexpr unsigned long to_ulong() const; // (1) C++23 ``` diff --git a/reference/cassert/assert.md b/reference/cassert/assert.md index b844285e69..e88014428e 100644 --- a/reference/cassert/assert.md +++ b/reference/cassert/assert.md @@ -4,10 +4,10 @@ ```cpp #if !defined(NDEBUG) - #define assert(expr) implementation-defined // (1) C++03 + #define assert(expr) implementation-defined // (1) C++98 #define assert(...) implementation-defined // (1) C++26 #else - #define assert(ignore) ((void)0) // (2) C++03 + #define assert(ignore) ((void)0) // (2) C++98 #define assert(...) ((void)0) // (2) C++26 #endif ``` @@ -27,7 +27,7 @@ ## 効果 - 有効な場合: - - C++03 : パラメータの式を評価し、 + - C++98 : パラメータの式を評価し、 - C++26 : 可変引数パラメータ`__VA_ARGS__`を`bool`に変換し、 - 真に評価された場合は、なにもしない - そうでない場合(`0`と等しい場合)、式をテキスト化したもの、([`std::source_location`](/reference/source_location/source_location.md)`::`[`current()`](/reference/source_location/source_location/current.md)で取得できるような)ソースファイル名、行番号、関数名を標準エラー出力に処理系定義の書式で書き込み、[`abort()`](/reference/cstdlib/abort.md)関数を呼び出してプログラムを異常終了させる diff --git a/reference/cerrno.md b/reference/cerrno.md index 9fa48490f4..579d488ef3 100644 --- a/reference/cerrno.md +++ b/reference/cerrno.md @@ -20,7 +20,7 @@ ``ヘッダで定義されるマクロは、 -- C++03では、C標準ライブラリの``と同じである +- C++98では、C標準ライブラリの``と同じである - C++11以降では、POSIXの``と同じである | 名前 | 説明 | 対応バージョン | diff --git a/reference/climits/char_bit.md b/reference/climits/char_bit.md index 9a34b7ed55..2f02442c68 100644 --- a/reference/climits/char_bit.md +++ b/reference/climits/char_bit.md @@ -29,7 +29,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/char_max.md b/reference/climits/char_max.md index 548be7370d..d4f6379fd5 100644 --- a/reference/climits/char_max.md +++ b/reference/climits/char_max.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 ### 処理系 diff --git a/reference/climits/char_min.md b/reference/climits/char_min.md index a1b804a945..dfe3894acd 100644 --- a/reference/climits/char_min.md +++ b/reference/climits/char_min.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/int_max.md b/reference/climits/int_max.md index baa89290d0..8196e226dd 100644 --- a/reference/climits/int_max.md +++ b/reference/climits/int_max.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/int_min.md b/reference/climits/int_min.md index 9c1a616205..85f3e8aa72 100644 --- a/reference/climits/int_min.md +++ b/reference/climits/int_min.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/long_max.md b/reference/climits/long_max.md index 509bea494c..3a64e3d45a 100644 --- a/reference/climits/long_max.md +++ b/reference/climits/long_max.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/long_min.md b/reference/climits/long_min.md index 8d794434f9..61342a6b65 100644 --- a/reference/climits/long_min.md +++ b/reference/climits/long_min.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/mb_len_max.md b/reference/climits/mb_len_max.md index f1c4f10ec8..c9e617f036 100644 --- a/reference/climits/mb_len_max.md +++ b/reference/climits/mb_len_max.md @@ -29,7 +29,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/schar_max.md b/reference/climits/schar_max.md index e3f5e85e0f..3f3aada7cb 100644 --- a/reference/climits/schar_max.md +++ b/reference/climits/schar_max.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/schar_min.md b/reference/climits/schar_min.md index 0b2f7478ee..bea794923b 100644 --- a/reference/climits/schar_min.md +++ b/reference/climits/schar_min.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/shrt_max.md b/reference/climits/shrt_max.md index 1e6ac558c4..45036d2bf2 100644 --- a/reference/climits/shrt_max.md +++ b/reference/climits/shrt_max.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/shrt_min.md b/reference/climits/shrt_min.md index 8a8068e220..d35d377986 100644 --- a/reference/climits/shrt_min.md +++ b/reference/climits/shrt_min.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/uchar_max.md b/reference/climits/uchar_max.md index 84dd3d7952..2a60f1227e 100644 --- a/reference/climits/uchar_max.md +++ b/reference/climits/uchar_max.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/uint_max.md b/reference/climits/uint_max.md index ddaa305a7f..0bd49e9759 100644 --- a/reference/climits/uint_max.md +++ b/reference/climits/uint_max.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/ulong_max.md b/reference/climits/ulong_max.md index 4fa8f2270d..94429892e2 100644 --- a/reference/climits/ulong_max.md +++ b/reference/climits/ulong_max.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/climits/ushrt_max.md b/reference/climits/ushrt_max.md index 8c15a005cc..bcd3a204c1 100644 --- a/reference/climits/ushrt_max.md +++ b/reference/climits/ushrt_max.md @@ -33,7 +33,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 diff --git a/reference/cmath.md b/reference/cmath.md index 77fe39f748..c399d795c4 100644 --- a/reference/cmath.md +++ b/reference/cmath.md @@ -34,7 +34,7 @@ ## 標準Cライブラリとの差異 ``は基本的には、標準 C ライブラリの `` に準拠しているが、いくつかの変更点がある。 -### C++03のC90との差異 +### C++98のC90との差異 - 各関数は std 名前空間に定義されている。 - `fabs` と等価の関数 `abs` を追加している。 - `pow` の第 2 引数が `int` のオーバーロードを追加している。 @@ -128,7 +128,7 @@ floating-point-type abs(floating-point-type x); `` で提供される各関数においてエラーが発生した場合、[`errno`](cerrno/errno.md)、あるいは、浮動小数点例外のいずれか、もしくは両方によってエラーが通知される。 C++11 以降の場合、どちらの方法によって通知されるかは [`math_errhandling`](cmath/math_errhandling.md) の値によって判別可能である。(利用者が選択する事はできない) -C++03 までの場合、[`errno`](cerrno/errno.md) でしか通知されない。 +C++98 までの場合、[`errno`](cerrno/errno.md) でしか通知されない。 ### [`errno`](cerrno/errno.md) によるエラーの通知 [`errno`](cerrno/errno.md) によってエラーが通知される場合、エラー内容は [`errno`](cerrno/errno.md) に設定された値によって判別可能である。 diff --git a/reference/cmath/abs.md b/reference/cmath/abs.md index d8e6b701c9..f549cae857 100644 --- a/reference/cmath/abs.md +++ b/reference/cmath/abs.md @@ -6,11 +6,11 @@ ```cpp namespace std { - float abs(float x); // (1) C++03からC++20まで + float abs(float x); // (1) C++98からC++20まで - double abs(double x); // (2) C++03からC++20まで + double abs(double x); // (2) C++98からC++20まで - long double abs(long double x); // (3) C++03からC++20まで + long double abs(long double x); // (3) C++98からC++20まで constexpr floating-point-type abs(floating-point-type x); // (4) C++23 diff --git a/reference/cmath/acos.md b/reference/cmath/acos.md index f63d060279..703b032d78 100644 --- a/reference/cmath/acos.md +++ b/reference/cmath/acos.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float acos(float x); // (1) C++03からC++20まで - double acos(double x); // (2) C++03からC++20まで - long double acos(long double x); // (3) C++03からC++20まで + float acos(float x); // (1) C++98からC++20まで + double acos(double x); // (2) C++98からC++20まで + long double acos(long double x); // (3) C++98からC++20まで floating-point-type acos(floating-point-type x); // (4) C++23 @@ -95,7 +95,7 @@ acos(-1.0) = 3.141593 ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/asin.md b/reference/cmath/asin.md index ce82aa5582..cb8f42255f 100644 --- a/reference/cmath/asin.md +++ b/reference/cmath/asin.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float asin(float x); // (1) C++03からC++20まで - double asin(double x); // (2) C++03からC++20まで - long double asin(long double x); // (3) C++03からC++20まで + float asin(float x); // (1) C++98からC++20まで + double asin(double x); // (2) C++98からC++20まで + long double asin(long double x); // (3) C++98からC++20まで floating-point-type asin(floating-point-type x); // (4) C++23 @@ -91,7 +91,7 @@ asin(1.0) = 1.570796 ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/atan.md b/reference/cmath/atan.md index 06612bb69c..f5f2690abc 100644 --- a/reference/cmath/atan.md +++ b/reference/cmath/atan.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float atan(float x); // (1) C++03からC++20まで - double atan(double x); // (2) C++03からC++20まで - long double atan(long double x); // (3) C++03からC++20まで + float atan(float x); // (1) C++98からC++20まで + double atan(double x); // (2) C++98からC++20まで + long double atan(long double x); // (3) C++98からC++20まで floating-point-type atan(floating-point-type x); // (4) C++23 @@ -82,7 +82,7 @@ atan(∞) = 1.570796 ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/atan2.md b/reference/cmath/atan2.md index 51087c7837..5e903a48bd 100644 --- a/reference/cmath/atan2.md +++ b/reference/cmath/atan2.md @@ -6,10 +6,10 @@ ```cpp namespace std { - float atan2(float y, float x); // (1) C++03からC++20まで - double atan2(double y, double x); // (2) C++03からC++20まで + float atan2(float y, float x); // (1) C++98からC++20まで + double atan2(double y, double x); // (2) C++98からC++20まで long double - atan2(long double y, long double x); // (3) C++03からC++20まで + atan2(long double y, long double x); // (3) C++98からC++20まで floating-point-type atan2(floating-point-type y, @@ -118,7 +118,7 @@ atan2(-1.0, 1.0) = -0.785398 ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/ceil.md b/reference/cmath/ceil.md index 8a41f3cebb..d9d30ddb88 100644 --- a/reference/cmath/ceil.md +++ b/reference/cmath/ceil.md @@ -5,9 +5,9 @@ ```cpp namespace std { - float ceil(float x); // (1) C++03からC++20まで - double ceil(double x); // (2) C++03からC++20まで - long double ceil(long double x); // (3) C++03からC++20まで + float ceil(float x); // (1) C++98からC++20まで + double ceil(double x); // (2) C++98からC++20まで + long double ceil(long double x); // (3) C++98からC++20まで constexpr floating-point-type ceil(floating-point-type x); // (4) C++23 diff --git a/reference/cmath/cos.md b/reference/cmath/cos.md index 8a1f3543dc..eff71da1cc 100644 --- a/reference/cmath/cos.md +++ b/reference/cmath/cos.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float cos(float x); // (1) C++03からC++20まで - double cos(double x); // (2) C++03からC++20まで - long double cos(long double x); // (3) C++03からC++20まで + float cos(float x); // (1) C++98からC++20まで + double cos(double x); // (2) C++98からC++20まで + long double cos(long double x); // (3) C++98からC++20まで floating-point-type cos(floating-point-type x); // (4) C++23 @@ -111,7 +111,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/cosh.md b/reference/cmath/cosh.md index bc9d9eafaf..aa47d52632 100644 --- a/reference/cmath/cosh.md +++ b/reference/cmath/cosh.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float cosh(float x); // (1) C++03からC++20まで - double cosh(double x); // (2) C++03からC++20まで - long double cosh(long double x); // (3) C++03からC++20まで + float cosh(float x); // (1) C++98からC++20まで + double cosh(double x); // (2) C++98からC++20まで + long double cosh(long double x); // (3) C++98からC++20まで floating-point-type cosh(floating-point-type x); // (4) C++23 @@ -84,7 +84,7 @@ cosh(1.0) = 1.543081 ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/exp.md b/reference/cmath/exp.md index fc84b3496f..c03cd8c956 100644 --- a/reference/cmath/exp.md +++ b/reference/cmath/exp.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float exp(float x); // (1) C++03からC++20まで - double exp(double x); // (2) C++03からC++20まで - long double exp(long double x); // (3) C++03からC++20まで + float exp(float x); // (1) C++98からC++20まで + double exp(double x); // (2) C++98からC++20まで + long double exp(long double x); // (3) C++98からC++20まで floating-point-type exp(floating-point-type x); // (4) C++23 @@ -89,7 +89,7 @@ exp(-∞) = 0.000000 ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/fabs.md b/reference/cmath/fabs.md index 65f8d5f709..560a5b4dbe 100644 --- a/reference/cmath/fabs.md +++ b/reference/cmath/fabs.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float fabs(float x); // (1) C++03からC++20まで - double fabs(double x); // (2) C++03からC++20まで - long double fabs(long double x); // (3) C++03からC++20まで + float fabs(float x); // (1) C++98からC++20まで + double fabs(double x); // (2) C++98からC++20まで + long double fabs(long double x); // (3) C++98からC++20まで constexpr floating-point-type fabs(floating-point-type x); // (4) C++23 @@ -90,7 +90,7 @@ fabs(-∞) = inf ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/floor.md b/reference/cmath/floor.md index 5d0a67871b..e1bd63ff69 100644 --- a/reference/cmath/floor.md +++ b/reference/cmath/floor.md @@ -5,9 +5,9 @@ ```cpp namespace std { - float floor(float x); // (1) C++03からC++20まで - double floor(double x); // (2) C++03からC++20まで - long double floor(long double x); // (3) C++03からC++20まで + float floor(float x); // (1) C++98からC++20まで + double floor(double x); // (2) C++98からC++20まで + long double floor(long double x); // (3) C++98からC++20まで constexpr floating-point-type floor(floating-point-type x); // (4) C++23 diff --git a/reference/cmath/fmod.md b/reference/cmath/fmod.md index de9ca3f613..ebcf9aa59f 100644 --- a/reference/cmath/fmod.md +++ b/reference/cmath/fmod.md @@ -5,10 +5,10 @@ ```cpp namespace std { - float fmod(float x, float y); // (1) C++03からC++20まで - double fmod(double x, double y); // (2) C++03からC++20まで + float fmod(float x, float y); // (1) C++98からC++20まで + double fmod(double x, double y); // (2) C++98からC++20まで long double fmod(long double x, - long double y); // (3) C++03からC++20まで + long double y); // (3) C++98からC++20まで constexpr floating-point-type fmod(floating-point-type x, diff --git a/reference/cmath/frexp.md b/reference/cmath/frexp.md index 679e0826bd..be2eaf9e5b 100644 --- a/reference/cmath/frexp.md +++ b/reference/cmath/frexp.md @@ -5,9 +5,9 @@ ```cpp namespace std { - float frexp(float value, int* exp); // (1) C++03からC++20まで - double frexp(double value, int* exp); // (2) C++03からC++20まで - long double frexp(long double value, int* exp); // (3) C++03からC++20まで + float frexp(float value, int* exp); // (1) C++98からC++20まで + double frexp(double value, int* exp); // (2) C++98からC++20まで + long double frexp(long double value, int* exp); // (3) C++98からC++20まで constexpr floating-point-type frexp(floating-point-type value, int* exp); // (4) C++23 diff --git a/reference/cmath/ldexp.md b/reference/cmath/ldexp.md index ee18fec2c3..bd3612dab9 100644 --- a/reference/cmath/ldexp.md +++ b/reference/cmath/ldexp.md @@ -5,9 +5,9 @@ ```cpp namespace std { - float ldexp(float x, int exp); // (1) C++03からC++20まで - double ldexp(double x, int exp); // (2) C++03からC++20まで - long double ldexp(long double x, int exp); // (3) C++03からC++20まで + float ldexp(float x, int exp); // (1) C++98からC++20まで + double ldexp(double x, int exp); // (2) C++98からC++20まで + long double ldexp(long double x, int exp); // (3) C++98からC++20まで constexpr floating-point-type ldexp(floating-point-type x, int exp); // (4) C++23 diff --git a/reference/cmath/log.md b/reference/cmath/log.md index 6e21aa6241..a18688cb95 100644 --- a/reference/cmath/log.md +++ b/reference/cmath/log.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float log(float x); // (1) C++03からC++20まで - double log(double x); // (2) C++03からC++20まで - long double log(long double x); // (3) C++03からC++20まで + float log(float x); // (1) C++98からC++20まで + double log(double x); // (2) C++98からC++20まで + long double log(long double x); // (3) C++98からC++20まで floating-point-type log(floating-point-type x); // (4) C++23 @@ -91,7 +91,7 @@ log(-1.0) = nan ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/log10.md b/reference/cmath/log10.md index 1e268e85ee..d0adaf5156 100644 --- a/reference/cmath/log10.md +++ b/reference/cmath/log10.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float log10(float x); // (1) C++03からC++20まで - double log10(double x); // (2) C++03からC++20まで - long double log10(long double x); // (3) C++03からC++20まで + float log10(float x); // (1) C++98からC++20まで + double log10(double x); // (2) C++98からC++20まで + long double log10(long double x); // (3) C++98からC++20まで floating-point-type log10(floating-point-type x); // (4) C++23 @@ -123,7 +123,7 @@ log10(100000000.000000) : 8.000000 ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/modf.md b/reference/cmath/modf.md index 2c317af73e..7126d34240 100644 --- a/reference/cmath/modf.md +++ b/reference/cmath/modf.md @@ -6,12 +6,12 @@ ```cpp namespace std { float - modf(float value, float* iptr); // (1) C++03からC++20まで + modf(float value, float* iptr); // (1) C++98からC++20まで double - modf(double value, double* iptr); // (2) C++03からC++20まで + modf(double value, double* iptr); // (2) C++98からC++20まで long double modf(long double value, - long double* iptr); // (3) C++03からC++20まで + long double* iptr); // (3) C++98からC++20まで constexpr floating-point-type modf(floating-point-type value, diff --git a/reference/cmath/pow.md b/reference/cmath/pow.md index 5878da2f8c..e703435b51 100644 --- a/reference/cmath/pow.md +++ b/reference/cmath/pow.md @@ -8,23 +8,23 @@ namespace std { float pow(float x, - float y); // (1) C++03からC++20まで + float y); // (1) C++98からC++20まで double pow(double x, - double y); // (2) C++03からC++20まで + double y); // (2) C++98からC++20まで long double pow(long double x, - long double y); // (3) C++03からC++20まで + long double y); // (3) C++98からC++20まで float pow(float x, - int y); // (4) C++03まで + int y); // (4) C++98まで double pow(double x, - int y); // (5) C++03まで + int y); // (5) C++98まで long double pow(long double x, - int y); // (6) C++03まで + int y); // (6) C++98まで floating-point-type pow(floating-point-type x, @@ -147,7 +147,7 @@ pow(2.0, -∞) = 0.000000 ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/sin.md b/reference/cmath/sin.md index 1978c2964c..0bfae04e77 100644 --- a/reference/cmath/sin.md +++ b/reference/cmath/sin.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float sin(float x); // (1) C++03からC++20まで - double sin(double x); // (2) C++03からC++20まで - long double sin(long double x); // (3) C++03からC++20まで + float sin(float x); // (1) C++98からC++20まで + double sin(double x); // (2) C++98からC++20まで + long double sin(long double x); // (3) C++98からC++20まで floating-point-type sin(floating-point-type x); // (4) C++23 @@ -111,7 +111,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/sinh.md b/reference/cmath/sinh.md index 5f0e4441b8..07ad595e9d 100644 --- a/reference/cmath/sinh.md +++ b/reference/cmath/sinh.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float sinh(float x); // (1) C++03からC++20まで - double sinh(double x); // (2) C++03からC++20まで - long double sinh(long double x); // (3) C++03からC++20まで + float sinh(float x); // (1) C++98からC++20まで + double sinh(double x); // (2) C++98からC++20まで + long double sinh(long double x); // (3) C++98からC++20まで floating-point-type sinh(floating-point-type x); // (4) C++23 @@ -84,7 +84,7 @@ sinh(1.0) = 1.175201 ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/sqrt.md b/reference/cmath/sqrt.md index be41bd8c0e..c5a6aa89ee 100644 --- a/reference/cmath/sqrt.md +++ b/reference/cmath/sqrt.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float sqrt(float x); // (1) C++03からC++20まで - double sqrt(double x); // (2) C++03からC++20まで - long double sqrt(long double x); // (3) C++03からC++20まで + float sqrt(float x); // (1) C++98からC++20まで + double sqrt(double x); // (2) C++98からC++20まで + long double sqrt(long double x); // (3) C++98からC++20まで floating-point-type sqrt(floating-point-type x); // (4) C++23 @@ -99,7 +99,7 @@ sqrt(-1.0) = -nan ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/tan.md b/reference/cmath/tan.md index eb4ab0fe42..cb2a20a1fb 100644 --- a/reference/cmath/tan.md +++ b/reference/cmath/tan.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float tan(float x); // (1) C++03からC++20まで - double tan(double x); // (2) C++03からC++20まで - long double tan(long double x); // (3) C++03からC++20まで + float tan(float x); // (1) C++98からC++20まで + double tan(double x); // (2) C++98からC++20まで + long double tan(long double x); // (3) C++98からC++20まで floating-point-type tan(floating-point-type x); // (4) C++23 @@ -86,7 +86,7 @@ tan(pi/2) = 16331239353195370.000000 ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/cmath/tanh.md b/reference/cmath/tanh.md index b4580f2949..16a96f3cec 100644 --- a/reference/cmath/tanh.md +++ b/reference/cmath/tanh.md @@ -6,9 +6,9 @@ ```cpp namespace std { - float tanh(float x); // (1) C++03からC++20まで - double tanh(double x); // (2) C++03からC++20まで - long double tanh(long double x); // (3) C++03からC++20まで + float tanh(float x); // (1) C++98からC++20まで + double tanh(double x); // (2) C++98からC++20まで + long double tanh(long double x); // (3) C++98からC++20まで floating-point-type tanh(floating-point-type x); // (4) C++23 @@ -81,7 +81,7 @@ tanh(1.0) = 0.761594 ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/complex/complex/abs.md b/reference/complex/complex/abs.md index ca5c58020f..5deb319989 100644 --- a/reference/complex/complex/abs.md +++ b/reference/complex/complex/abs.md @@ -7,7 +7,7 @@ namespace std { template T - abs(const complex& x); // (1) C++03 + abs(const complex& x); // (1) C++98 template constexpr T abs(const complex& x); // (1) C++26 diff --git a/reference/complex/complex/arg.md b/reference/complex/complex/arg.md index bfae17bf51..2a6d6718e8 100644 --- a/reference/complex/complex/arg.md +++ b/reference/complex/complex/arg.md @@ -7,7 +7,7 @@ namespace std { template T - arg(const complex& x); // (1) C++03 + arg(const complex& x); // (1) C++98 template constexpr T arg(const complex& x); // (1) C++26 diff --git a/reference/complex/complex/conj.md b/reference/complex/complex/conj.md index 4127b4372e..fd265ddb98 100644 --- a/reference/complex/complex/conj.md +++ b/reference/complex/complex/conj.md @@ -7,7 +7,7 @@ namespace std { template complex - conj(const complex& x); // (1) C++03 + conj(const complex& x); // (1) C++98 template constexpr complex conj(const complex& x); // (1) C++20 diff --git a/reference/complex/complex/cos.md b/reference/complex/complex/cos.md index fc185cdb7f..b885d33379 100644 --- a/reference/complex/complex/cos.md +++ b/reference/complex/complex/cos.md @@ -7,7 +7,7 @@ namespace std { template complex - cos(const complex& x); // (1) C++03 + cos(const complex& x); // (1) C++98 template constexpr complex cos(const complex& x); // (1) C++26 diff --git a/reference/complex/complex/cosh.md b/reference/complex/complex/cosh.md index bc7d126771..5717b6c349 100644 --- a/reference/complex/complex/cosh.md +++ b/reference/complex/complex/cosh.md @@ -7,7 +7,7 @@ namespace std { template complex - cosh(const complex& x); // (1) C++03 + cosh(const complex& x); // (1) C++98 template constexpr complex cosh(const complex& x); // (1) C++26 diff --git a/reference/complex/complex/exp.md b/reference/complex/complex/exp.md index dd3121d55f..63f0db8c8e 100644 --- a/reference/complex/complex/exp.md +++ b/reference/complex/complex/exp.md @@ -7,7 +7,7 @@ namespace std { template complex - exp(const complex& x); // (1) C++03 + exp(const complex& x); // (1) C++98 template constexpr complex exp(const complex& x); // (1) C++26 diff --git a/reference/complex/complex/imag.md b/reference/complex/complex/imag.md index fdb3d2be31..cfac99a6bf 100644 --- a/reference/complex/complex/imag.md +++ b/reference/complex/complex/imag.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -T imag() const; // (1) C++03 +T imag() const; // (1) C++98 constexpr T imag() const; // (1) C++14 void imag(T val); // (2) C++11 diff --git a/reference/complex/complex/imag_free.md b/reference/complex/complex/imag_free.md index 02e834e253..75d5d167d1 100644 --- a/reference/complex/complex/imag_free.md +++ b/reference/complex/complex/imag_free.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - T imag(const complex& x); // (1) C++03 + T imag(const complex& x); // (1) C++98 template constexpr T imag(const complex& x); // (1) C++14 diff --git a/reference/complex/complex/log.md b/reference/complex/complex/log.md index 87797145d2..df3e47c5aa 100644 --- a/reference/complex/complex/log.md +++ b/reference/complex/complex/log.md @@ -7,7 +7,7 @@ namespace std { template complex - log(const complex& x); // (1) C++03 + log(const complex& x); // (1) C++98 template constexpr complex log(const complex& x); // (1) C++26 diff --git a/reference/complex/complex/log10.md b/reference/complex/complex/log10.md index f6c276856e..18192e21eb 100644 --- a/reference/complex/complex/log10.md +++ b/reference/complex/complex/log10.md @@ -7,7 +7,7 @@ namespace std { template complex - log10(const complex& x); // (1) C++03 + log10(const complex& x); // (1) C++98 template constexpr complex log10(const complex& x); // (1) C++26 diff --git a/reference/complex/complex/norm.md b/reference/complex/complex/norm.md index a960459468..a4f0202d0e 100644 --- a/reference/complex/complex/norm.md +++ b/reference/complex/complex/norm.md @@ -7,7 +7,7 @@ namespace std { template T - norm(const complex& x); // (1) C++03 + norm(const complex& x); // (1) C++98 template constexpr T norm(const complex& x); // (1) C++20 diff --git a/reference/complex/complex/op_assign.md b/reference/complex/complex/op_assign.md index b1cbc4e201..4ec0d16b91 100644 --- a/reference/complex/complex/op_assign.md +++ b/reference/complex/complex/op_assign.md @@ -5,14 +5,14 @@ * function[meta id-type] ```cpp -complex& operator=(const T& rhs); // (1) C++03 +complex& operator=(const T& rhs); // (1) C++98 constexpr complex& operator=(const T& rhs); // (1) C++20 -complex& operator=(const complex& rhs); // (2) C++03 +complex& operator=(const complex& rhs); // (2) C++98 constexpr complex& operator=(const complex& rhs); // (2) C++20 template -complex& operator=(const complex& rhs); // (3) C++03 +complex& operator=(const complex& rhs); // (3) C++98 template constexpr complex& operator=(const complex& rhs); // (3) C++20 ``` diff --git a/reference/complex/complex/op_constructor.md b/reference/complex/complex/op_constructor.md index 452b989663..bd6917560f 100644 --- a/reference/complex/complex/op_constructor.md +++ b/reference/complex/complex/op_constructor.md @@ -5,15 +5,15 @@ * function[meta id-type] ```cpp -complex(const T& re = T(), const T& im = T()); // (1) C++03 +complex(const T& re = T(), const T& im = T()); // (1) C++98 constexpr complex(const T& re = T(), const T& im = T()); // (1) C++14 -complex(const complex& other); // (2) C++03 +complex(const complex& other); // (2) C++98 constexpr complex(const complex& other); // (2) C++14 constexpr complex(const complex& other) = default; // (2) C++23 template -complex(const complex& other); // (3) C++03 +complex(const complex& other); // (3) C++98 template constexpr complex(const complex& other); // (3) C++14 template diff --git a/reference/complex/complex/op_divide.md b/reference/complex/complex/op_divide.md index 683a573124..bab941ab8c 100644 --- a/reference/complex/complex/op_divide.md +++ b/reference/complex/complex/op_divide.md @@ -7,7 +7,7 @@ namespace std { template complex - operator/(const complex& lhs, const complex& rhs); // (1) C++03 + operator/(const complex& lhs, const complex& rhs); // (1) C++98 template constexpr complex @@ -15,7 +15,7 @@ namespace std { template complex - operator/(const complex& lhs, const T& rhs); // (2) C++03 + operator/(const complex& lhs, const T& rhs); // (2) C++98 template constexpr complex @@ -23,7 +23,7 @@ namespace std { template complex - operator/(const T& lhs, const complex& rhs); // (3) C++03 + operator/(const T& lhs, const complex& rhs); // (3) C++98 template constexpr complex diff --git a/reference/complex/complex/op_divide_assign.md b/reference/complex/complex/op_divide_assign.md index bb9edb8ae9..f4594cef27 100644 --- a/reference/complex/complex/op_divide_assign.md +++ b/reference/complex/complex/op_divide_assign.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -complex& operator/=(const T& rhs); // (1) C++03 +complex& operator/=(const T& rhs); // (1) C++98 constexpr complex& operator/=(const T& rhs); // (1) C++20 template -complex& operator/=(const complex& rhs); // (2) C++03 +complex& operator/=(const complex& rhs); // (2) C++98 template constexpr complex& operator/=(const complex& rhs); // (2) C++20 ``` diff --git a/reference/complex/complex/op_equal.md b/reference/complex/complex/op_equal.md index a9e14f7bf5..e3775124e4 100644 --- a/reference/complex/complex/op_equal.md +++ b/reference/complex/complex/op_equal.md @@ -7,14 +7,14 @@ namespace std { template bool operator==(const complex& lhs, - const complex& rhs); // (1) C++03 + const complex& rhs); // (1) C++98 template constexpr bool operator==(const complex& lhs, const complex& rhs); // (1) C++14 template bool operator==(const complex& lhs, - const T& rhs); // (2) C++03 + const T& rhs); // (2) C++98 template constexpr bool operator==(const complex& lhs, const T& rhs); // (2) C++14 @@ -22,7 +22,7 @@ namespace std { // (2)により、以下のオーバーロードが使用可能になる (C++20) template bool operator==(const T& lhs, - const complex& rhs); // (3) C++03 + const complex& rhs); // (3) C++98 template constexpr bool operator==(const T& lhs, const complex& rhs); // (3) C++14 diff --git a/reference/complex/complex/op_minus.md b/reference/complex/complex/op_minus.md index 3e7ec5559f..a454b8a2a9 100644 --- a/reference/complex/complex/op_minus.md +++ b/reference/complex/complex/op_minus.md @@ -7,7 +7,7 @@ namespace std { template complex - operator-(const complex& lhs, const complex& rhs); // (1) C++03 + operator-(const complex& lhs, const complex& rhs); // (1) C++98 template constexpr complex @@ -15,7 +15,7 @@ namespace std { template complex - operator-(const complex& lhs, const T& rhs); // (2) C++03 + operator-(const complex& lhs, const T& rhs); // (2) C++98 template constexpr complex @@ -23,7 +23,7 @@ namespace std { template complex - operator-(const T& lhs, const complex& rhs); // (3) C++03 + operator-(const T& lhs, const complex& rhs); // (3) C++98 template constexpr complex diff --git a/reference/complex/complex/op_minus_assign.md b/reference/complex/complex/op_minus_assign.md index e57bdd3453..da95e08e4b 100644 --- a/reference/complex/complex/op_minus_assign.md +++ b/reference/complex/complex/op_minus_assign.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -complex& operator-=(const T& rhs); // (1) C++03 +complex& operator-=(const T& rhs); // (1) C++98 constexpr complex& operator-=(const T& rhs); // (1) C++20 template -complex& operator-=(const complex& rhs); // (2) C++03 +complex& operator-=(const complex& rhs); // (2) C++98 template constexpr complex& operator-=(const complex& rhs); // (2) C++20 ``` diff --git a/reference/complex/complex/op_multiply.md b/reference/complex/complex/op_multiply.md index 7e0c94d789..90a8812ece 100644 --- a/reference/complex/complex/op_multiply.md +++ b/reference/complex/complex/op_multiply.md @@ -7,7 +7,7 @@ namespace std { template complex - operator*(const complex& lhs, const complex& rhs); // (1) C++03 + operator*(const complex& lhs, const complex& rhs); // (1) C++98 template constexpr complex @@ -15,7 +15,7 @@ namespace std { template complex - operator*(const complex& lhs, const T& rhs); // (2) C++03 + operator*(const complex& lhs, const T& rhs); // (2) C++98 template constexpr complex @@ -23,7 +23,7 @@ namespace std { template complex - operator*(const T& lhs, const complex& rhs); // (3) C++03 + operator*(const T& lhs, const complex& rhs); // (3) C++98 template constexpr complex diff --git a/reference/complex/complex/op_multiply_assign.md b/reference/complex/complex/op_multiply_assign.md index 24d9446384..957aaa69dd 100644 --- a/reference/complex/complex/op_multiply_assign.md +++ b/reference/complex/complex/op_multiply_assign.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -complex& operator*=(const T& rhs); // (1) C++03 +complex& operator*=(const T& rhs); // (1) C++98 constexpr complex& operator*=(const T& rhs); // (1) C++20 template -complex& operator*=(const complex& rhs); // (2) C++03 +complex& operator*=(const complex& rhs); // (2) C++98 template constexpr complex& operator*=(const complex& rhs); // (2) C++20 ``` diff --git a/reference/complex/complex/op_not_equal.md b/reference/complex/complex/op_not_equal.md index c781fe79ff..f40a84223e 100644 --- a/reference/complex/complex/op_not_equal.md +++ b/reference/complex/complex/op_not_equal.md @@ -8,21 +8,21 @@ namespace std { // operator==により、以下の演算子が使用可能になる (C++20) template bool operator!=(const complex& lhs, - const complex& rhs); // (1) C++03 + const complex& rhs); // (1) C++98 template constexpr bool operator!=(const complex& lhs, const complex& rhs); // (1) C++14 template bool operator!=(const complex& lhs, - const T& rhs); // (2) C++03 + const T& rhs); // (2) C++98 template constexpr bool operator!=(const complex& lhs, const T& rhs); // (2) C++14 template bool operator!=(const T& lhs, - const complex& rhs); // (3) C++03 + const complex& rhs); // (3) C++98 template constexpr bool operator!=(const T& lhs, const complex& rhs); // (3) C++14 diff --git a/reference/complex/complex/op_plus.md b/reference/complex/complex/op_plus.md index a25e764a74..9a80653f8b 100644 --- a/reference/complex/complex/op_plus.md +++ b/reference/complex/complex/op_plus.md @@ -7,7 +7,7 @@ namespace std { template complex - operator+(const complex& lhs, const complex& rhs); // (1) C++03 + operator+(const complex& lhs, const complex& rhs); // (1) C++98 template constexpr complex @@ -15,7 +15,7 @@ namespace std { template complex - operator+(const complex& lhs, const T& rhs); // (2) C++03 + operator+(const complex& lhs, const T& rhs); // (2) C++98 template constexpr complex @@ -23,7 +23,7 @@ namespace std { template complex - operator+(const T& lhs, const complex& rhs); // (3) C++03 + operator+(const T& lhs, const complex& rhs); // (3) C++98 template constexpr complex diff --git a/reference/complex/complex/op_plus_assign.md b/reference/complex/complex/op_plus_assign.md index c1913be6fe..80c5998453 100644 --- a/reference/complex/complex/op_plus_assign.md +++ b/reference/complex/complex/op_plus_assign.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -complex& operator+=(const T& rhs); // (1) C++03 +complex& operator+=(const T& rhs); // (1) C++98 constexpr complex& operator+=(const T& rhs); // (1) C++20 template -complex& operator+=(const complex& rhs); // (2) C++03 +complex& operator+=(const complex& rhs); // (2) C++98 template constexpr complex& operator+=(const complex& rhs); // (2) C++20 ``` diff --git a/reference/complex/complex/op_unary_minus.md b/reference/complex/complex/op_unary_minus.md index 0ece0d005c..7d7793dcd4 100644 --- a/reference/complex/complex/op_unary_minus.md +++ b/reference/complex/complex/op_unary_minus.md @@ -7,7 +7,7 @@ ```cpp namespace std { template - complex operator-(const complex& lhs); // (1) C++03 + complex operator-(const complex& lhs); // (1) C++98 template constexpr complex operator-(const complex& lhs); // (1) C++20 diff --git a/reference/complex/complex/op_unary_plus.md b/reference/complex/complex/op_unary_plus.md index 2891d09ef2..d15ce69f41 100644 --- a/reference/complex/complex/op_unary_plus.md +++ b/reference/complex/complex/op_unary_plus.md @@ -7,7 +7,7 @@ ```cpp namespace std { template - complex operator+(const complex& lhs); // (1) C++03 + complex operator+(const complex& lhs); // (1) C++98 template constexpr complex operator+(const complex& lhs); // (1) C++20 diff --git a/reference/complex/complex/polar.md b/reference/complex/complex/polar.md index 8d83edf2d1..a411848dce 100644 --- a/reference/complex/complex/polar.md +++ b/reference/complex/complex/polar.md @@ -8,7 +8,7 @@ namespace std { template complex polar(const T& rho, - const T& theta = T()); // (1) C++03 + const T& theta = T()); // (1) C++98 template constexpr complex polar(const T& rho, diff --git a/reference/complex/complex/pow.md b/reference/complex/complex/pow.md index 62c3629409..02816b31c3 100644 --- a/reference/complex/complex/pow.md +++ b/reference/complex/complex/pow.md @@ -8,7 +8,7 @@ namespace std { template complex pow(const complex& x, - const complex& y); // (1) C++03 + const complex& y); // (1) C++98 template constexpr complex pow(const complex& x, @@ -17,7 +17,7 @@ namespace std { template complex pow(const complex& x, - const T& y); // (2) C++03 + const T& y); // (2) C++98 template constexpr complex pow(const complex& x, @@ -26,7 +26,7 @@ namespace std { template complex pow(const T& x, - const complex& y); // (3) C++03 + const complex& y); // (3) C++98 template constexpr complex pow(const T& x, @@ -35,7 +35,7 @@ namespace std { template complex pow(const complex& x, - int y); // (4) C++03 まで + int y); // (4) C++98 まで complex pow(ArithmeticOrComplex1 x, diff --git a/reference/complex/complex/real.md b/reference/complex/complex/real.md index 7254b9ce38..2c970d1a4b 100644 --- a/reference/complex/complex/real.md +++ b/reference/complex/complex/real.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -T real() const; // (1) C++03 +T real() const; // (1) C++98 constexpr T real() const; // (1) C++14 void real(T val); // (2) C++11 diff --git a/reference/complex/complex/real_free.md b/reference/complex/complex/real_free.md index 5edf176bdf..60c218d3e1 100644 --- a/reference/complex/complex/real_free.md +++ b/reference/complex/complex/real_free.md @@ -7,7 +7,7 @@ namespace std { template T - real(const complex& x); // (1) C++03 + real(const complex& x); // (1) C++98 template constexpr T real(const complex& x); // (1) C++14 diff --git a/reference/complex/complex/sin.md b/reference/complex/complex/sin.md index 5162b0368b..aade8dad02 100644 --- a/reference/complex/complex/sin.md +++ b/reference/complex/complex/sin.md @@ -7,7 +7,7 @@ namespace std { template complex - sin(const complex& x); // (1) C++03 + sin(const complex& x); // (1) C++98 template constexpr complex sin(const complex& x); // (1) C++26 diff --git a/reference/complex/complex/sinh.md b/reference/complex/complex/sinh.md index 89d797f1b0..bb4d284414 100644 --- a/reference/complex/complex/sinh.md +++ b/reference/complex/complex/sinh.md @@ -7,7 +7,7 @@ namespace std { template complex - sinh(const complex& x); // (1) C++03 + sinh(const complex& x); // (1) C++98 template constexpr complex sinh(const complex& x); // (1) C++26 diff --git a/reference/complex/complex/sqrt.md b/reference/complex/complex/sqrt.md index b27f004653..0e65726563 100644 --- a/reference/complex/complex/sqrt.md +++ b/reference/complex/complex/sqrt.md @@ -8,7 +8,7 @@ namespace std { template complex - sqrt(const complex& x); // (1) C++03 + sqrt(const complex& x); // (1) C++98 template constexpr complex sqrt(const complex& x); // (1) C++26 diff --git a/reference/complex/complex/tan.md b/reference/complex/complex/tan.md index 614690cddd..b77d1ef08e 100644 --- a/reference/complex/complex/tan.md +++ b/reference/complex/complex/tan.md @@ -7,7 +7,7 @@ namespace std { template complex - tan(const complex& x); // (1) C++03 + tan(const complex& x); // (1) C++98 template constexpr complex tan(const complex& x); // (1) C++26 diff --git a/reference/complex/complex/tanh.md b/reference/complex/complex/tanh.md index 4a147037b1..9001144eb9 100644 --- a/reference/complex/complex/tanh.md +++ b/reference/complex/complex/tanh.md @@ -7,7 +7,7 @@ namespace std { template complex - tanh(const complex& x); // (1) C++03 + tanh(const complex& x); // (1) C++98 template constexpr complex tanh(const complex& x); // (1) C++26 diff --git a/reference/cstdarg/va_arg.md b/reference/cstdarg/va_arg.md index 96d4657ca6..dadb0030ea 100644 --- a/reference/cstdarg/va_arg.md +++ b/reference/cstdarg/va_arg.md @@ -60,7 +60,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/cstdarg/va_end.md b/reference/cstdarg/va_end.md index c2d0af4aae..cf06418e08 100644 --- a/reference/cstdarg/va_end.md +++ b/reference/cstdarg/va_end.md @@ -61,7 +61,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/cstdarg/va_start.md b/reference/cstdarg/va_start.md index ee7f29ef9a..a943a964b4 100644 --- a/reference/cstdarg/va_start.md +++ b/reference/cstdarg/va_start.md @@ -3,7 +3,7 @@ * macro[meta id-type] ```cpp -#define va_start(ap, parmN) unspecified // (1) C++03 +#define va_start(ap, parmN) unspecified // (1) C++98 #define va_start(ap, ...) unspecified // (1) C++26 ``` * unspecified[italic] @@ -13,7 +13,7 @@ `ap`を初期化した後は、[`va_arg`](va_arg.md)マクロで各引数を順に取り出せる。使用後は、同じ`ap`に対して[`va_end`](va_end.md)マクロを呼び出さなければならない。 -- C++03 : 第2引数`parmN`には、可変引数(`...`)の直前にある関数の仮引数を指定する。 +- C++98 : 第2引数`parmN`には、可変引数(`...`)の直前にある関数の仮引数を指定する。 - C++26 : 可変引数マクロとなり、`ap`以降の引数(`...`)は破棄される。歴史的経緯から第2引数を受け付けるが、その値は使用されない。 @@ -68,7 +68,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/cstddef/null.md b/reference/cstddef/null.md index 74776d1546..abe5dc8aae 100644 --- a/reference/cstddef/null.md +++ b/reference/cstddef/null.md @@ -30,7 +30,7 @@ int main() { ``` ## 備考 -C++03において、「ヌルポインタ定数」は「値が0になる整数定数式」と定義されていた。したがって、マクロ`NULL`の値として`0`や`0L`は規格に適合するが、`(void*)0`は整数定数式ではないため適合しない。 +C++98において、「ヌルポインタ定数」は「値が0になる整数定数式」と定義されていた。したがって、マクロ`NULL`の値として`0`や`0L`は規格に適合するが、`(void*)0`は整数定数式ではないため適合しない。 C++11では、「ヌルポインタ定数」の定義に「[`std::nullptr_t`](/reference/cstddef/nullptr_t.md)型のprvalue」が追加されたため、`nullptr`も規格に適合する。しかし、`NULL`の値の型が変わるとコードの互換性を損なうことから、当面の間`NULL`の値は整数定数式であると思われる。C++11以降は`NULL`ではなく[`nullptr`](/lang/cpp11/nullptr.md)を使用するとよい。 diff --git a/reference/cstddef/size_t.md b/reference/cstddef/size_t.md index f1f8dfc047..df030f30e2 100644 --- a/reference/cstddef/size_t.md +++ b/reference/cstddef/size_t.md @@ -12,7 +12,7 @@ namespace std { ## 概要 `size_t`は、オブジェクトのバイト数を表現できる程度に十分に大きい符号なし整数型である。 -C++03まではC言語と同じく「`sizeof`演算子によって返される符号なし整数型」と規定されていた。 +C++98まではC言語と同じく「`sizeof`演算子によって返される符号なし整数型」と規定されていた。 オブジェクトのバイト数(例えば[`malloc`](/reference/cstdlib/malloc.md)の引数)やコンテナの要素数(例えば[`std::size()`](/reference/iterator/size.md)の戻り値)を表現するために用いられる。 diff --git a/reference/cstdint.md b/reference/cstdint.md index fa471ce38b..0da2863851 100644 --- a/reference/cstdint.md +++ b/reference/cstdint.md @@ -194,7 +194,7 @@ C99 の 7.18.3 `` についての脚注で、同ヘッダを C++ で > `__STDC_CONSTANT_MACROS` (mentioned in footnotes 219, 220, and 222 in > the C standard) play no role in C++. -おそらく上記 C99 の脚注のため、 C++ 処理系によってはヘッダ `` および `` での限界値マクロ、定数値マクロの提供にこれらマクロの定義が必要となっているかもしれない。(特に C++03 対応の処理系が拡張として C99 由来のこれらヘッダを提供していた場合など。) +おそらく上記 C99 の脚注のため、 C++ 処理系によってはヘッダ `` および `` での限界値マクロ、定数値マクロの提供にこれらマクロの定義が必要となっているかもしれない。(特に C++98 対応の処理系が拡張として C99 由来のこれらヘッダを提供していた場合など。) - glibc に対するバグ報告(修正は 2013/05/21 ) [Bug 15366 – Per C11 and C++11, `` should not look at `__STDC_LIMIT_MACROS` or `__STDC_CONSTANT_MACROS`](https://sourceware.org/bugzilla/show_bug.cgi?id=15366) diff --git a/reference/cstdlib/abort.md b/reference/cstdlib/abort.md index 7a7806f5a0..5793049422 100644 --- a/reference/cstdlib/abort.md +++ b/reference/cstdlib/abort.md @@ -5,7 +5,7 @@ ```cpp namespace std { - void abort(); // C++03 + void abort(); // C++98 [[noreturn]] void abort() noexcept; // C++11 } ``` diff --git a/reference/cstdlib/abs.md b/reference/cstdlib/abs.md index 0010c4e811..3dd4b82217 100644 --- a/reference/cstdlib/abs.md +++ b/reference/cstdlib/abs.md @@ -6,12 +6,12 @@ ```cpp namespace std { int - abs(int j); // (1) C++03 + abs(int j); // (1) C++98 constexpr int abs(int j); // (1) C++23 long - abs(long j); // (2) C++03 + abs(long j); // (2) C++98 constexpr long abs(long j); // (2) C++23 @@ -21,17 +21,17 @@ namespace std { abs(long long j); // (3) C++23 float - abs(float j); // (4) C++03からC++20まで + abs(float j); // (4) C++98からC++20まで double - abs(double j); // (5) C++03からC++20まで + abs(double j); // (5) C++98からC++20まで long double - abs(long double j); // (6) C++03からC++20まで + abs(long double j); // (6) C++98からC++20まで constexpr floating-point-type abs(floating-point-type j); // (7) C++23 long - labs(long j); // (8) C++03 + labs(long j); // (8) C++98 constexpr long labs(long j); // (8) C++23 diff --git a/reference/cstdlib/atexit.md b/reference/cstdlib/atexit.md index 26a9b3009a..93a1f96ba3 100644 --- a/reference/cstdlib/atexit.md +++ b/reference/cstdlib/atexit.md @@ -5,10 +5,10 @@ ```cpp namespace std { - extern "C" int atexit(void (*f)(void)); // (1) C++03 + extern "C" int atexit(void (*f)(void)); // (1) C++98 extern "C" int atexit(void (*f)(void)) noexcept; // (1) C++11 - extern "C++" int atexit(void (*f)(void)); // (2) C++03 + extern "C++" int atexit(void (*f)(void)); // (2) C++98 extern "C++" int atexit(void (*f)(void)) noexcept; // (2) C++11 } ``` diff --git a/reference/cstdlib/div.md b/reference/cstdlib/div.md index 85da2e3f52..2ffb7d2076 100644 --- a/reference/cstdlib/div.md +++ b/reference/cstdlib/div.md @@ -7,28 +7,28 @@ namespace std { div_t div(int numer, - int denom); // (1) C++03 + int denom); // (1) C++98 constexpr div_t div(int numer, int denom); // (1) C++23 ldiv_t div(long numer, - long denom); // (2) C++03 + long denom); // (2) C++98 constexpr ldiv_t div(long numer, long denom); // (2) C++23 lldiv_t div(long long numer, - long long denom); // (3) C++03 + long long denom); // (3) C++98 constexpr lldiv_t div(long long numer, long long denom); // (3) C++23 ldiv_t ldiv(long numer, - long denom); // (4) C++03 + long denom); // (4) C++98 constexpr ldiv_t ldiv(long numer, long denom); // (4) C++23 diff --git a/reference/cstdlib/exit.md b/reference/cstdlib/exit.md index 87344c01a2..8707193f3b 100644 --- a/reference/cstdlib/exit.md +++ b/reference/cstdlib/exit.md @@ -5,7 +5,7 @@ ```cpp namespace std { - void exit(int status); // C++03 + void exit(int status); // C++98 [[noreturn]] void exit(int status); // C++11 } ``` diff --git a/reference/ctime/asctime.md b/reference/ctime/asctime.md index 21595ff74d..5c408f4cb6 100644 --- a/reference/ctime/asctime.md +++ b/reference/ctime/asctime.md @@ -55,7 +55,7 @@ Fri May 29 14:30:00 2026 ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/ctime/clock.md b/reference/ctime/clock.md index 7a88f6838a..e3f0ccd1fe 100644 --- a/reference/ctime/clock.md +++ b/reference/ctime/clock.md @@ -62,7 +62,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/ctime/clock_t.md b/reference/ctime/clock_t.md index e833301d72..e911843c32 100644 --- a/reference/ctime/clock_t.md +++ b/reference/ctime/clock_t.md @@ -50,7 +50,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/ctime/ctime.md b/reference/ctime/ctime.md index 09a56a8786..25181d22fb 100644 --- a/reference/ctime/ctime.md +++ b/reference/ctime/ctime.md @@ -56,7 +56,7 @@ Fri May 29 14:30:00 2026 ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/ctime/difftime.md b/reference/ctime/difftime.md index 757d64d001..c2789970fb 100644 --- a/reference/ctime/difftime.md +++ b/reference/ctime/difftime.md @@ -58,7 +58,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/ctime/gmtime.md b/reference/ctime/gmtime.md index ca8b542daf..bd22cd8812 100644 --- a/reference/ctime/gmtime.md +++ b/reference/ctime/gmtime.md @@ -58,7 +58,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/ctime/localtime.md b/reference/ctime/localtime.md index e26f6decf3..4c4f07edd3 100644 --- a/reference/ctime/localtime.md +++ b/reference/ctime/localtime.md @@ -59,7 +59,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/ctime/mktime.md b/reference/ctime/mktime.md index 78ca1d441c..5b2c948155 100644 --- a/reference/ctime/mktime.md +++ b/reference/ctime/mktime.md @@ -59,7 +59,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/ctime/strftime.md b/reference/ctime/strftime.md index 7366ae8ad6..7c00ae3d99 100644 --- a/reference/ctime/strftime.md +++ b/reference/ctime/strftime.md @@ -74,7 +74,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/ctime/time.md b/reference/ctime/time.md index e019b33026..67ba1c0c4d 100644 --- a/reference/ctime/time.md +++ b/reference/ctime/time.md @@ -51,7 +51,7 @@ Wed Aug 19 12:34:56 2026 ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/ctime/tm.md b/reference/ctime/tm.md index 6fc0776ffb..4f0bc30da8 100644 --- a/reference/ctime/tm.md +++ b/reference/ctime/tm.md @@ -70,7 +70,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/deque/deque/assign.md b/reference/deque/deque/assign.md index e94aae9c31..7707681961 100644 --- a/reference/deque/deque/assign.md +++ b/reference/deque/deque/assign.md @@ -7,13 +7,13 @@ ```cpp template void - assign(InputIterator first, InputIterator last); // (1) C++03 + assign(InputIterator first, InputIterator last); // (1) C++98 template constexpr void assign(InputIterator first, InputIterator last); // (1) C++26 void - assign(size_type n, const T& t); // (2) C++03 + assign(size_type n, const T& t); // (2) C++98 constexpr void assign(size_type n, const T& t); // (2) C++26 diff --git a/reference/deque/deque/at.md b/reference/deque/deque/at.md index 07f81c135b..81f9feaa67 100644 --- a/reference/deque/deque/at.md +++ b/reference/deque/deque/at.md @@ -6,12 +6,12 @@ ```cpp reference - at(size_type n); // (1) C++03 + at(size_type n); // (1) C++98 constexpr reference at(size_type n); // (1) C++26 const_reference - at(size_type n) const; // (2) C++03 + at(size_type n) const; // (2) C++98 constexpr const_reference at(size_type n) const; // (2) C++26 ``` diff --git a/reference/deque/deque/back.md b/reference/deque/deque/back.md index a8efffd1c9..a67e69c9f7 100644 --- a/reference/deque/deque/back.md +++ b/reference/deque/deque/back.md @@ -6,12 +6,12 @@ ```cpp reference - back(); // (1) C++03 + back(); // (1) C++98 constexpr reference back(); // (1) C++26 const_reference - back() const; // (2) C++03 + back() const; // (2) C++98 constexpr const_reference back() const; // (2) C++26 ``` diff --git a/reference/deque/deque/begin.md b/reference/deque/deque/begin.md index 26047a3194..db2671031a 100644 --- a/reference/deque/deque/begin.md +++ b/reference/deque/deque/begin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator begin(); // (1) C++03 +iterator begin(); // (1) C++98 iterator begin() noexcept; // (1) C++11 constexpr iterator begin() noexcept; // (1) C++26 -const_iterator begin() const; // (2) C++03 +const_iterator begin() const; // (2) C++98 const_iterator begin() const noexcept; // (2) C++11 constexpr const_iterator begin() const noexcept; // (2) C++26 ``` diff --git a/reference/deque/deque/clear.md b/reference/deque/deque/clear.md index 5ad9166694..2b0c34b361 100644 --- a/reference/deque/deque/clear.md +++ b/reference/deque/deque/clear.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void clear(); // (1) C++03 +void clear(); // (1) C++98 void clear() noexcept; // (1) C++11 constexpr void clear() noexcept; // (1) C++26 ``` @@ -72,5 +72,5 @@ int main() ## 参照 - [LWG Issue 2231. DR 704 removes complexity guarantee for `clear()`](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2231) - - C++03までこの関数の効果は`erase(begin(), end())`だったため、それによって線形時間の計算量が保証されていたが、C++11で効果の表記が変わったために、保証がなくなってしまっていた。C++14であらためて保証を追加。 + - C++98までこの関数の効果は`erase(begin(), end())`だったため、それによって線形時間の計算量が保証されていたが、C++11で効果の表記が変わったために、保証がなくなってしまっていた。C++14であらためて保証を追加。 - [P3372R3 constexpr containers and adaptors](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3372r3.html) diff --git a/reference/deque/deque/empty.md b/reference/deque/deque/empty.md index e1421e050d..a068cf0dae 100644 --- a/reference/deque/deque/empty.md +++ b/reference/deque/deque/empty.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool empty() const; // (1) C++03 +bool empty() const; // (1) C++98 bool empty() const noexcept; // (1) C++11 [[nodiscard]] bool empty() const noexcept; // (1) C++20 constexpr bool empty() const noexcept; // (1) C++26 diff --git a/reference/deque/deque/end.md b/reference/deque/deque/end.md index 7a75684be8..f128cfc7d8 100644 --- a/reference/deque/deque/end.md +++ b/reference/deque/deque/end.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator end(); // (1) C++03 +iterator end(); // (1) C++98 iterator end() noexcept; // (1) C++11 constexpr iterator end() noexcept; // (1) C++26 -const_iterator end() const; // (2) C++03 +const_iterator end() const; // (2) C++98 const_iterator end() const noexcept; // (2) C++11 constexpr const_iterator end() const noexcept; // (2) C++26 ``` diff --git a/reference/deque/deque/erase.md b/reference/deque/deque/erase.md index 59344a140e..39bce65cc9 100644 --- a/reference/deque/deque/erase.md +++ b/reference/deque/deque/erase.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator erase(iterator position); // (1) C++03 +iterator erase(iterator position); // (1) C++98 iterator erase(const_iterator position); // (1) C++11 constexpr iterator erase(const_iterator position); // (1) C++26 -iterator erase(iterator first, iterator last); // (2) C++03 +iterator erase(iterator first, iterator last); // (2) C++98 iterator erase(const_iterator first, const_iterator last); // (2) C++11 constexpr iterator erase(const_iterator first, const_iterator last); // (2) C++26 ``` diff --git a/reference/deque/deque/front.md b/reference/deque/deque/front.md index 78b038eae9..d97c627936 100644 --- a/reference/deque/deque/front.md +++ b/reference/deque/deque/front.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -reference front(); // (1) C++03 +reference front(); // (1) C++98 constexpr reference front(); // (1) C++26 -const_reference front() const; // (2) C++03 +const_reference front() const; // (2) C++98 constexpr const_reference front() const; // (2) C++26 ``` diff --git a/reference/deque/deque/get_allocator.md b/reference/deque/deque/get_allocator.md index a29fb82635..e8c62f0a51 100644 --- a/reference/deque/deque/get_allocator.md +++ b/reference/deque/deque/get_allocator.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -allocator_type get_allocator() const; // (1) C++03 +allocator_type get_allocator() const; // (1) C++98 allocator_type get_allocator() const noexcept; // (1) C++11 constexpr allocator_type get_allocator() const noexcept; // (1) C++26 ``` @@ -59,7 +59,7 @@ int main () ## バージョン ### 言語 -- C++03 +- C++98 - C++11 ### 処理系 diff --git a/reference/deque/deque/insert.md b/reference/deque/deque/insert.md index 7f68c56274..256d15d1a0 100644 --- a/reference/deque/deque/insert.md +++ b/reference/deque/deque/insert.md @@ -7,7 +7,7 @@ ```cpp iterator insert(iterator position, - const T& x); // (1) C++03 + const T& x); // (1) C++98 iterator insert(const_iterator position, const T& x); // (1) C++11 @@ -25,7 +25,7 @@ constexpr iterator void insert(iterator position, size_type n, - const T& x); // (3) C++03 + const T& x); // (3) C++98 iterator insert(const_iterator position, size_type n, @@ -39,7 +39,7 @@ template void insert(iterator position, InputIterator first, - InputIterator last); // (4) C++03 + InputIterator last); // (4) C++98 template iterator insert(const_iterator position, @@ -81,7 +81,7 @@ constexpr iterator ## 戻り値 -- C++03まで一番上のバージョンのみ、新しい要素が挿入された場所を指すイテレータを返す。 +- C++98まで一番上のバージョンのみ、新しい要素が挿入された場所を指すイテレータを返す。 - C++11以降新しい要素が挿入された場所を示すイテレータ。 @@ -91,7 +91,7 @@ constexpr iterator ## 備考 - 条件付きで、例外が発生した場合に副作用が発生しない保証がある。 - - C++03: 要素型`T`のコピーコンストラクタ、代入演算子以外で例外が発生した場合、副作用は発生しない。 + - C++98: 要素型`T`のコピーコンストラクタ、代入演算子以外で例外が発生した場合、副作用は発生しない。 - C++11: 要素型`T`のコピーコンストラクタ、ムーブコンストラクタ、代入演算子、ムーブ代入演算子以外で例外が発生した場合、副作用は発生しない。(ムーブについて規定が追加された。) - C++14: 単一要素を終端あるいは先頭に追加する際に例外が発生した場合、副作用は発生しない。それ以外はC++11と同様。 diff --git a/reference/deque/deque/max_size.md b/reference/deque/deque/max_size.md index b7a5ac133b..eb0a1b7951 100644 --- a/reference/deque/deque/max_size.md +++ b/reference/deque/deque/max_size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type max_size() const; // (1) C++03 +size_type max_size() const; // (1) C++98 size_type max_size() const noexcept; // (2) C++11 constexpr size_type max_size() const noexcept; // (3) C++26 ``` diff --git a/reference/deque/deque/op_assign.md b/reference/deque/deque/op_assign.md index d9182128e8..535bd5307d 100644 --- a/reference/deque/deque/op_assign.md +++ b/reference/deque/deque/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -deque& operator=(const deque& x); // (1) C++03 +deque& operator=(const deque& x); // (1) C++98 constexpr deque& operator=(const deque& x); // (1) C++26 deque& operator=(deque&& x); // (2) C++11 diff --git a/reference/deque/deque/op_at.md b/reference/deque/deque/op_at.md index 57edc93686..0d01b9f433 100644 --- a/reference/deque/deque/op_at.md +++ b/reference/deque/deque/op_at.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -reference operator[](size_type n); // (1) C++03 +reference operator[](size_type n); // (1) C++98 constexpr reference operator[](size_type n); // (1) C++26 -const_reference operator[](size_type n) const; // (2) C++03 +const_reference operator[](size_type n) const; // (2) C++98 constexpr const_reference operator[](size_type n) const; // (2) C++26 ``` diff --git a/reference/deque/deque/op_constructor.md b/reference/deque/deque/op_constructor.md index 448657d57f..8c11a3f7e1 100644 --- a/reference/deque/deque/op_constructor.md +++ b/reference/deque/deque/op_constructor.md @@ -14,7 +14,7 @@ constexpr explicit deque(const Allocator& a); // (2) C++26 explicit deque(const Allocator& a = Allocator()); // (1)+(2) : C++11 まで。C++14 で削除 explicit deque(size_type n, const T& value = T(), - const Allocator& a = Allocator()); // (3) C++03 まで。C++11 で削除 + const Allocator& a = Allocator()); // (3) C++98 まで。C++11 で削除 deque(size_type n, const T& value, @@ -36,14 +36,14 @@ constexpr explicit template deque(InputIterator first, InputIterator last, - const Allocator& a = Allocator()); // (5) C++03 + const Allocator& a = Allocator()); // (5) C++98 template constexpr deque(InputIterator first, InputIterator last, const Allocator& a = Allocator()); // (5) C++26 -deque(const deque& x); // (6) C++03 +deque(const deque& x); // (6) C++98 constexpr deque(const deque& x); // (6) C++26 deque(deque&& y); // (7) C++11 から @@ -125,7 +125,7 @@ constexpr ## 備考 -- イテレータ範囲コンストラクタ `template deque(InputIterator first, InputIterator last, const Allocator& a = Allocator())` は、C++03 までは `InputIterator` が整数型の場合には `deque(static_cast(first), static_cast(last), a)` と等価とされていたが、C++11 では `InputIterator` が入力イテレータの要件を満たさなければオーバーロード解決に参加しないように変更された。 +- イテレータ範囲コンストラクタ `template deque(InputIterator first, InputIterator last, const Allocator& a = Allocator())` は、C++98 までは `InputIterator` が整数型の場合には `deque(static_cast(first), static_cast(last), a)` と等価とされていたが、C++11 では `InputIterator` が入力イテレータの要件を満たさなければオーバーロード解決に参加しないように変更された。 - C++11 では、`explicit deque(size_type n, const T& value = T(), const Allocator& a = Allocator())` の引数 `value` に関するデフォルト引数が削除され、新たなコンストラクタ `explicit deque(size_type n)` が追加された。 これは、デフォルト引数を使用すると、引数 `value` のデフォルト初期化 1 回+`deque` の要素へのコピー初期化 `n` 回のコンストラクタ呼び出しが必要となるが、デフォルト引数でなければ `deque` の要素へのデフォルト初期化 `n` 回のコンストラクタ呼び出しで済むためである。 diff --git a/reference/deque/deque/op_destructor.md b/reference/deque/deque/op_destructor.md index d937d8c1a0..36e923741d 100644 --- a/reference/deque/deque/op_destructor.md +++ b/reference/deque/deque/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -~deque(); // (1) C++03 +~deque(); // (1) C++98 constexpr ~deque(); // (1) C++26 ``` diff --git a/reference/deque/deque/op_equal.md b/reference/deque/deque/op_equal.md index f569c1190f..1e7c65a292 100644 --- a/reference/deque/deque/op_equal.md +++ b/reference/deque/deque/op_equal.md @@ -8,7 +8,7 @@ namespace std { template bool operator==(const deque& x, - const deque& y); // (1) C++03 + const deque& y); // (1) C++98 template constexpr bool operator==(const deque& x, @@ -25,7 +25,7 @@ namespace std { ## 効果 -- C++03 : +- C++98 : ```cpp x.size() == y.size() && equal(x.begin(), x.end(), y.begin()); diff --git a/reference/deque/deque/op_greater.md b/reference/deque/deque/op_greater.md index 079acc99ee..bb55765bd8 100644 --- a/reference/deque/deque/op_greater.md +++ b/reference/deque/deque/op_greater.md @@ -9,7 +9,7 @@ namespace std { template bool operator>(const deque& x, - const deque& y); // (1) C++03 + const deque& y); // (1) C++98 template constexpr bool operator>(const deque& x, diff --git a/reference/deque/deque/op_greater_equal.md b/reference/deque/deque/op_greater_equal.md index c9d20068ed..e97d8fbf6d 100644 --- a/reference/deque/deque/op_greater_equal.md +++ b/reference/deque/deque/op_greater_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator>=(const deque& x, - const deque& y); // (1) C++03 + const deque& y); // (1) C++98 template constexpr bool operator>=(const deque& x, diff --git a/reference/deque/deque/op_less.md b/reference/deque/deque/op_less.md index 091c604998..1671800c2e 100644 --- a/reference/deque/deque/op_less.md +++ b/reference/deque/deque/op_less.md @@ -9,7 +9,7 @@ namespace std { template bool operator<(const deque& x, - const deque& y); // (1) C++03 + const deque& y); // (1) C++98 template constexpr bool operator<(const deque& x, diff --git a/reference/deque/deque/op_less_equal.md b/reference/deque/deque/op_less_equal.md index 005ad3ecbc..bea6336d35 100644 --- a/reference/deque/deque/op_less_equal.md +++ b/reference/deque/deque/op_less_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator<=(const deque& x, - const deque& y); // (1) C++03 + const deque& y); // (1) C++98 template constexpr bool operator<=(const deque& x, diff --git a/reference/deque/deque/op_not_equal.md b/reference/deque/deque/op_not_equal.md index b117e7dd37..f9b1d034d5 100644 --- a/reference/deque/deque/op_not_equal.md +++ b/reference/deque/deque/op_not_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator!=(const deque& x, - const deque& y); // (1) C++03 + const deque& y); // (1) C++98 template constexpr bool operator!=(const deque& x, diff --git a/reference/deque/deque/pop_back.md b/reference/deque/deque/pop_back.md index 04a4ec95d2..be3ffca1bc 100644 --- a/reference/deque/deque/pop_back.md +++ b/reference/deque/deque/pop_back.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void pop_back(); // (1) C++03 +void pop_back(); // (1) C++98 constexpr void pop_back(); // (1) C++26 ``` diff --git a/reference/deque/deque/pop_front.md b/reference/deque/deque/pop_front.md index 9f24965e02..1ee4b6dd07 100644 --- a/reference/deque/deque/pop_front.md +++ b/reference/deque/deque/pop_front.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void pop_front(); // (1) C++03 +void pop_front(); // (1) C++98 constexpr void pop_front(); // (1) C++26 ``` diff --git a/reference/deque/deque/push_back.md b/reference/deque/deque/push_back.md index 50db7f1683..f3d4538b6a 100644 --- a/reference/deque/deque/push_back.md +++ b/reference/deque/deque/push_back.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void push_back(const T& x); // (1) C++03 +void push_back(const T& x); // (1) C++98 constexpr void push_back(const T& x); // (1) C++26 void push_back(T&& y); // (2) C++11 diff --git a/reference/deque/deque/push_front.md b/reference/deque/deque/push_front.md index c9bff55a46..ff8965838e 100644 --- a/reference/deque/deque/push_front.md +++ b/reference/deque/deque/push_front.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void push_front(const T& x); // (1) C++03 +void push_front(const T& x); // (1) C++98 constexpr void push_front(const T& x); // (1) C++26 void push_front(T&& y); // (2) C++11 diff --git a/reference/deque/deque/rbegin.md b/reference/deque/deque/rbegin.md index 67608b1270..daa399ef1c 100644 --- a/reference/deque/deque/rbegin.md +++ b/reference/deque/deque/rbegin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rbegin(); // (1) C++03 +reverse_iterator rbegin(); // (1) C++98 reverse_iterator rbegin() noexcept; // (1) C++11 constexpr reverse_iterator rbegin() noexcept; // (1) C++26 -const_reverse_iterator rbegin() const; // (2) C++03 +const_reverse_iterator rbegin() const; // (2) C++98 const_reverse_iterator rbegin() const noexcept; // (2) C++11 constexpr const_reverse_iterator rbegin() const noexcept; // (2) C++26 ``` diff --git a/reference/deque/deque/rend.md b/reference/deque/deque/rend.md index b4ceffce76..2887c0c4d0 100644 --- a/reference/deque/deque/rend.md +++ b/reference/deque/deque/rend.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rend(); // (1) C++03 +reverse_iterator rend(); // (1) C++98 reverse_iterator rend() noexcept; // (1) C++11 constexpr reverse_iterator rend() noexcept; // (1) C++26 -const_reverse_iterator rend() const; // (2) C++03 +const_reverse_iterator rend() const; // (2) C++98 const_reverse_iterator rend() const noexcept; // (2) C++11 constexpr const_reverse_iterator rend() const noexcept; // (2) C++26 ``` diff --git a/reference/deque/deque/resize.md b/reference/deque/deque/resize.md index 49a70248a6..6f47b432d9 100644 --- a/reference/deque/deque/resize.md +++ b/reference/deque/deque/resize.md @@ -11,7 +11,7 @@ constexpr void resize(size_type sz); // (1) C++26 void resize(size_type sz, const T& c); // (2) C++11 constexpr void resize(size_type sz, const T& c); // (2) C++26 -void resize(size_type sz, const T& c = T()); // (1) + (2) : C++03まで +void resize(size_type sz, const T& c = T()); // (1) + (2) : C++98まで ``` ## 概要 diff --git a/reference/deque/deque/size.md b/reference/deque/deque/size.md index 6d73c06b63..65124e84d3 100644 --- a/reference/deque/deque/size.md +++ b/reference/deque/deque/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type size() const; // (1) C++03 +size_type size() const; // (1) C++98 size_type size() const noexcept; // (1) C++11 constexpr size_type size() const noexcept; // (1) C++26 ``` diff --git a/reference/deque/deque/swap.md b/reference/deque/deque/swap.md index d2f40c156a..1500db426c 100644 --- a/reference/deque/deque/swap.md +++ b/reference/deque/deque/swap.md @@ -6,7 +6,7 @@ ```cpp void - swap(deque& other); // (1) C++03 + swap(deque& other); // (1) C++98 void swap(deque& x) noexcept(allocator_traits::is_always_equal::value); // (1) C++17 diff --git a/reference/deque/deque/swap_free.md b/reference/deque/deque/swap_free.md index 8c79151148..59b8e1d654 100644 --- a/reference/deque/deque/swap_free.md +++ b/reference/deque/deque/swap_free.md @@ -8,7 +8,7 @@ namespace std { template void swap(deque& x, - deque& y); // (1) C++03 + deque& y); // (1) C++98 template void swap(deque& x, diff --git a/reference/exception/bad_exception/op_assign.md b/reference/exception/bad_exception/op_assign.md index 5a4250132a..94c73ec9cc 100644 --- a/reference/exception/bad_exception/op_assign.md +++ b/reference/exception/bad_exception/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bad_exception& operator=(const bad_exception&); // (1) C++03 +bad_exception& operator=(const bad_exception&); // (1) C++98 bad_exception& operator=(const bad_exception&) noexcept; // (1) C++11 constexpr bad_exception& operator=(const bad_exception&) noexcept; // (1) C++26 ``` diff --git a/reference/exception/bad_exception/op_constructor.md b/reference/exception/bad_exception/op_constructor.md index 217d505b9d..b188d114f1 100644 --- a/reference/exception/bad_exception/op_constructor.md +++ b/reference/exception/bad_exception/op_constructor.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -bad_exception(); // (1) C++03 +bad_exception(); // (1) C++98 bad_exception() noexcept; // (1) C++11 constexpr bad_exception() noexcept; // (1) C++26 -bad_exception(const bad_exception&); // (2) C++03 +bad_exception(const bad_exception&); // (2) C++98 bad_exception(const bad_exception&) noexcept; // (2) C++11 constexpr bad_exception(const bad_exception&) noexcept; // (2) C++26 ``` diff --git a/reference/exception/bad_exception/op_destructor.md b/reference/exception/bad_exception/op_destructor.md index 8147f2a904..8a7d8622c4 100644 --- a/reference/exception/bad_exception/op_destructor.md +++ b/reference/exception/bad_exception/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -virtual ~bad_exception(); // (1) C++03 +virtual ~bad_exception(); // (1) C++98 constexpr virtual ~bad_exception(); // (1) C++26 ``` diff --git a/reference/exception/bad_exception/what.md b/reference/exception/bad_exception/what.md index ed8fcd2894..c651ff5823 100644 --- a/reference/exception/bad_exception/what.md +++ b/reference/exception/bad_exception/what.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -virtual const char* what() const; // (1) C++03 +virtual const char* what() const; // (1) C++98 virtual const char* what() const noexcept; // (1) C++11 const char* what() const noexcept override; // (1) C++17 constexpr const char* what() const noexcept override; // (1) C++26 diff --git a/reference/exception/exception/op_assign.md b/reference/exception/exception/op_assign.md index 20c758ab78..df991fe58f 100644 --- a/reference/exception/exception/op_assign.md +++ b/reference/exception/exception/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -exception& operator=(const exception&); // (1) C++03 +exception& operator=(const exception&); // (1) C++98 exception& operator=(const exception&) noexcept; // (1) C++11 constexpr exception& operator=(const exception&) noexcept; // (1) C++26 ``` diff --git a/reference/exception/exception/op_constructor.md b/reference/exception/exception/op_constructor.md index 74581e19a8..1cb1b565b3 100644 --- a/reference/exception/exception/op_constructor.md +++ b/reference/exception/exception/op_constructor.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -exception(); // (1) C++03 +exception(); // (1) C++98 exception() noexcept; // (1) C++11 constexpr exception() noexcept; // (1) C++26 -exception(const exception&); // (2) C++03 +exception(const exception&); // (2) C++98 exception(const exception&) noexcept; // (2) C++11 constexpr exception(const exception&) noexcept; // (2) C++26 ``` diff --git a/reference/exception/exception/op_destructor.md b/reference/exception/exception/op_destructor.md index ea6a557f27..c5fd969921 100644 --- a/reference/exception/exception/op_destructor.md +++ b/reference/exception/exception/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -virtual ~exception(); // (1) C++03 +virtual ~exception(); // (1) C++98 constexpr virtual ~exception(); // (1) C++26 ``` diff --git a/reference/exception/exception/what.md b/reference/exception/exception/what.md index de20dff6fa..888dd7ee67 100644 --- a/reference/exception/exception/what.md +++ b/reference/exception/exception/what.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -virtual const char* what() const; // (1) C++03 +virtual const char* what() const; // (1) C++98 virtual const char* what() const noexcept; // (1) C++11 const char* what() const noexcept override; // (1) C++17 constexpr const char* what() const noexcept override; // (1) C++26 diff --git a/reference/exception/uncaught_exception.md b/reference/exception/uncaught_exception.md index a0f8c485b2..3931d45a9e 100644 --- a/reference/exception/uncaught_exception.md +++ b/reference/exception/uncaught_exception.md @@ -7,7 +7,7 @@ ```cpp namespace std { - bool uncaught_exception() throw(); // C++03 + bool uncaught_exception() throw(); // C++98 bool uncaught_exception() noexcept; // C++11 } ``` diff --git a/reference/forward_list/forward_list/clear.md b/reference/forward_list/forward_list/clear.md index 94c47aeeb4..de48b5d652 100644 --- a/reference/forward_list/forward_list/clear.md +++ b/reference/forward_list/forward_list/clear.md @@ -74,5 +74,5 @@ int main() ## 参照 - [LWG Issue 2231. DR 704 removes complexity guarantee for `clear()`](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2231) - - C++03までこの関数の効果は`erase(begin(), end())`だったため、それによって線形時間の計算量が保証されていたが、C++11で効果の表記が変わったために、保証がなくなってしまっていた。C++14であらためて保証を追加。 + - C++98までこの関数の効果は`erase(begin(), end())`だったため、それによって線形時間の計算量が保証されていたが、C++11で効果の表記が変わったために、保証がなくなってしまっていた。C++14であらためて保証を追加。 - [P3372R3 constexpr containers and adaptors](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3372r3.html) diff --git a/reference/fstream/basic_filebuf/imbue.md b/reference/fstream/basic_filebuf/imbue.md index 6c34cffcfb..1c877f47be 100644 --- a/reference/fstream/basic_filebuf/imbue.md +++ b/reference/fstream/basic_filebuf/imbue.md @@ -6,7 +6,7 @@ ```cpp protected: - virtual void imbue(const locale& loc); // (1) C++03 + virtual void imbue(const locale& loc); // (1) C++98 void imbue(const locale& loc) override; // (1) C++17 ``` * locale[link /reference/locale/locale.md] diff --git a/reference/fstream/basic_filebuf/overflow.md b/reference/fstream/basic_filebuf/overflow.md index f52e68f3de..567f177f5f 100644 --- a/reference/fstream/basic_filebuf/overflow.md +++ b/reference/fstream/basic_filebuf/overflow.md @@ -6,7 +6,7 @@ ```cpp protected: - virtual int_type overflow(int_type c = traits::eof()); // (1) C++03 + virtual int_type overflow(int_type c = traits::eof()); // (1) C++98 int_type overflow(int_type c = traits::eof()) override; // (1) C++17 ``` diff --git a/reference/fstream/basic_filebuf/pbackfail.md b/reference/fstream/basic_filebuf/pbackfail.md index 992ebc88fa..e734dd981e 100644 --- a/reference/fstream/basic_filebuf/pbackfail.md +++ b/reference/fstream/basic_filebuf/pbackfail.md @@ -6,7 +6,7 @@ ```cpp protected: - virtual int_type pbackfail(int_type c = traits::eof()); // (1) C++03 + virtual int_type pbackfail(int_type c = traits::eof()); // (1) C++98 int_type pbackfail(int_type c = traits::eof()) override; // (1) C++17 ``` diff --git a/reference/fstream/basic_filebuf/seekoff.md b/reference/fstream/basic_filebuf/seekoff.md index 68bd6c05ba..663e447945 100644 --- a/reference/fstream/basic_filebuf/seekoff.md +++ b/reference/fstream/basic_filebuf/seekoff.md @@ -9,7 +9,7 @@ protected: virtual pos_type seekoff(off_type off, ios_base::seekdir way, - ios_base::openmode which = ios_base::in | ios_base::out); // (1) C++03 + ios_base::openmode which = ios_base::in | ios_base::out); // (1) C++98 pos_type seekoff(off_type off, ios_base::seekdir way, diff --git a/reference/fstream/basic_filebuf/seekpos.md b/reference/fstream/basic_filebuf/seekpos.md index 6e868be966..a908c3f34d 100644 --- a/reference/fstream/basic_filebuf/seekpos.md +++ b/reference/fstream/basic_filebuf/seekpos.md @@ -8,7 +8,7 @@ protected: virtual pos_type seekpos(pos_type sp, - ios_base::openmode which = ios_base::in | ios_base::out); // (1) C++03 + ios_base::openmode which = ios_base::in | ios_base::out); // (1) C++98 pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out) override; // (1) C++17 diff --git a/reference/fstream/basic_filebuf/setbuf.md b/reference/fstream/basic_filebuf/setbuf.md index a1c0f3cf85..d753f46bb4 100644 --- a/reference/fstream/basic_filebuf/setbuf.md +++ b/reference/fstream/basic_filebuf/setbuf.md @@ -7,7 +7,7 @@ ```cpp protected: virtual basic_streambuf* - setbuf(char_type* s, streamsize n); // (1) C++03 + setbuf(char_type* s, streamsize n); // (1) C++98 basic_streambuf* setbuf(char_type* s, streamsize n) override; // (1) C++17 ``` diff --git a/reference/fstream/basic_filebuf/showmanyc.md b/reference/fstream/basic_filebuf/showmanyc.md index ae1a86cd1b..13683a6d22 100644 --- a/reference/fstream/basic_filebuf/showmanyc.md +++ b/reference/fstream/basic_filebuf/showmanyc.md @@ -6,7 +6,7 @@ ```cpp protected: - virtual streamsize showmanyc(); // (1) C++03 + virtual streamsize showmanyc(); // (1) C++98 streamsize showmanyc() override; // (1) C++17 ``` * streamsize[link /reference/ios/type-streamsize.md] diff --git a/reference/fstream/basic_filebuf/sync.md b/reference/fstream/basic_filebuf/sync.md index 9ecd9c72d7..4445d4bc1a 100644 --- a/reference/fstream/basic_filebuf/sync.md +++ b/reference/fstream/basic_filebuf/sync.md @@ -6,7 +6,7 @@ ```cpp protected: - virtual int sync(); // (1) C++03 + virtual int sync(); // (1) C++98 int sync() override; // (1) C++17 ``` diff --git a/reference/fstream/basic_filebuf/uflow.md b/reference/fstream/basic_filebuf/uflow.md index a27be42cef..4948d3271b 100644 --- a/reference/fstream/basic_filebuf/uflow.md +++ b/reference/fstream/basic_filebuf/uflow.md @@ -6,7 +6,7 @@ ```cpp protected: - virtual int_type uflow(); // (1) C++03 + virtual int_type uflow(); // (1) C++98 int_type uflow() override; // (1) C++17 ``` diff --git a/reference/fstream/basic_filebuf/underflow.md b/reference/fstream/basic_filebuf/underflow.md index 341e367a88..dc78a7fc51 100644 --- a/reference/fstream/basic_filebuf/underflow.md +++ b/reference/fstream/basic_filebuf/underflow.md @@ -6,7 +6,7 @@ ```cpp protected: - virtual int_type underflow(); // (1) C++03 + virtual int_type underflow(); // (1) C++98 int_type underflow() override; // (1) C++17 ``` diff --git a/reference/functional/divides.md b/reference/functional/divides.md index 2a3cf259d4..792717a8f1 100644 --- a/reference/functional/divides.md +++ b/reference/functional/divides.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct divides { T operator ()(const T& x, const T& y) const; diff --git a/reference/functional/equal_to.md b/reference/functional/equal_to.md index a4a89c4421..cfefd6c418 100644 --- a/reference/functional/equal_to.md +++ b/reference/functional/equal_to.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct equal_to { bool operator ()(const T& x, const T& y) const; diff --git a/reference/functional/greater.md b/reference/functional/greater.md index 0ef18d8c98..d67d14eb89 100644 --- a/reference/functional/greater.md +++ b/reference/functional/greater.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct greater { bool operator ()(const T& x, const T& y) const; diff --git a/reference/functional/greater_equal.md b/reference/functional/greater_equal.md index 26dc7cef81..7d814635e2 100644 --- a/reference/functional/greater_equal.md +++ b/reference/functional/greater_equal.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct greater_equal { bool operator ()(const T& x, const T& y) const; diff --git a/reference/functional/less.md b/reference/functional/less.md index 6ac9abd2a5..ddc63a2c9b 100644 --- a/reference/functional/less.md +++ b/reference/functional/less.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct less { bool operator ()(const T& x, const T& y) const; diff --git a/reference/functional/less_equal.md b/reference/functional/less_equal.md index 4a21894d57..067ccb0127 100644 --- a/reference/functional/less_equal.md +++ b/reference/functional/less_equal.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct less_equal { bool operator ()(const T& x, const T& y) const; diff --git a/reference/functional/logical_and.md b/reference/functional/logical_and.md index 01f433166a..3eb9816e73 100644 --- a/reference/functional/logical_and.md +++ b/reference/functional/logical_and.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct logical_and { bool operator ()(const T& x, const T& y) const; diff --git a/reference/functional/logical_not.md b/reference/functional/logical_not.md index 96700b15a9..61c94b9d0f 100644 --- a/reference/functional/logical_not.md +++ b/reference/functional/logical_not.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct logical_not { bool operator ()(const T& x) const; diff --git a/reference/functional/logical_or.md b/reference/functional/logical_or.md index eef431f0d9..4de0373c25 100644 --- a/reference/functional/logical_or.md +++ b/reference/functional/logical_or.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct logical_or { bool operator ()(const T& x, const T& y) const; diff --git a/reference/functional/minus.md b/reference/functional/minus.md index 97efc34985..0bfaf18d8c 100644 --- a/reference/functional/minus.md +++ b/reference/functional/minus.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct minus { T operator()(const T& x, const T& y) const; diff --git a/reference/functional/modulus.md b/reference/functional/modulus.md index 6f35078097..96ad150fe2 100644 --- a/reference/functional/modulus.md +++ b/reference/functional/modulus.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct modulus { T operator()(const T& x, const T& y) const; diff --git a/reference/functional/multiplies.md b/reference/functional/multiplies.md index c24c69e374..9489d554d1 100644 --- a/reference/functional/multiplies.md +++ b/reference/functional/multiplies.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct multiplies { T operator()(const T& x, const T& y) const; diff --git a/reference/functional/negate.md b/reference/functional/negate.md index 2339a97ee6..2951600170 100644 --- a/reference/functional/negate.md +++ b/reference/functional/negate.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct negate { T operator()(const T& x) const; diff --git a/reference/functional/not_equal_to.md b/reference/functional/not_equal_to.md index 85b3aef8f6..ad260e3848 100644 --- a/reference/functional/not_equal_to.md +++ b/reference/functional/not_equal_to.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct not_equal_to { bool operator ()(const T& x, const T& y) const; diff --git a/reference/functional/plus.md b/reference/functional/plus.md index a2eabaf9d9..f4bdca07bf 100644 --- a/reference/functional/plus.md +++ b/reference/functional/plus.md @@ -5,7 +5,7 @@ ```cpp namespace std { - // C++03 + // C++98 template struct plus { T operator()(const T& x, const T& y) const; diff --git a/reference/ios/basic_ios.md b/reference/ios/basic_ios.md index e03a40bb56..256402e2bd 100644 --- a/reference/ios/basic_ios.md +++ b/reference/ios/basic_ios.md @@ -37,7 +37,7 @@ namespace std { | [`operator=`](basic_ios/op_assign.md) | 代入演算子 | | なお、コピーコンストラクタとコピー代入演算子はdelete定義されている。 -C++03では、delete定義の代わりに`private`で宣言のみされていた。 +C++98では、delete定義の代わりに`private`で宣言のみされていた。 ### 状態ビット @@ -51,7 +51,7 @@ C++03では、delete定義の代わりに`private`で宣言のみされていた | [`fail`](basic_ios/fail.md) | fail状態であるか否かの判定 | | | [`bad`](basic_ios/bad.md) | bad状態であるか否かの判定 | | | [`operator bool`](basic_ios/op_bool.md) | 正常状態であるか否かの判定 | C++11 | -| [`operator void*`](basic_ios/op_voidptr.md) | 正常状態であるか否かの判定 | C++03 まで | +| [`operator void*`](basic_ios/op_voidptr.md) | 正常状態であるか否かの判定 | C++98 まで | | [`operator!`](basic_ios/op_not.md) | 異常状態であるか否かの判定 | | | [`exceptions`](basic_ios/exceptions.md) | 特定の状態時に例外を投げる指定の設定・取得 | | diff --git a/reference/ios/basic_ios/copyfmt.md b/reference/ios/basic_ios/copyfmt.md index f4e189801d..0b3cafcdeb 100644 --- a/reference/ios/basic_ios/copyfmt.md +++ b/reference/ios/basic_ios/copyfmt.md @@ -15,7 +15,7 @@ basic_ios& copyfmt(const basic_ios& rhs); ## 効果 - `*this`と`rhs`が同じオブジェクトを指している場合、何もしない - - C++03 : `this == &rhs` + - C++98 : `this == &rhs` - C++11 : `this ==` [`addressof`](/reference/memory/addressof.md)`(rhs)` - そうでなければ、以下のように引数 `rhs` のメンバオブジェクトを `*this` の対応するメンバオブジェクトに代入する。 diff --git a/reference/ios/basic_ios/op_assign.md b/reference/ios/basic_ios/op_assign.md index e57004e156..13719af2f4 100644 --- a/reference/ios/basic_ios/op_assign.md +++ b/reference/ios/basic_ios/op_assign.md @@ -6,7 +6,7 @@ ```cpp private: - basic_ios& operator=(const basic_ios&); // 宣言のみ、C++03 まで + basic_ios& operator=(const basic_ios&); // 宣言のみ、C++98 まで public: basic_ios& operator=(const basic_ios&) = delete; // C++11 から ``` @@ -23,7 +23,7 @@ public: ## 備考 - コピー代入演算子は、 - - C++03 : アクセス指定子`private`で宣言のみされ、定義はされない + - C++98 : アクセス指定子`private`で宣言のみされ、定義はされない - C++11 : アクセス指定子`public`で`delete`定義される (いずれにせよコピーすることはできないが、`public` で `delete` の方が誤ってコピーしようとした際のエラーメッセージが分かりやすいため、変更されている) - コピー代入演算子が宣言されているため、ムーブ代入演算子も自動生成されない。 diff --git a/reference/ios/basic_ios/op_bool.md b/reference/ios/basic_ios/op_bool.md index eba3853306..999f01e399 100644 --- a/reference/ios/basic_ios/op_bool.md +++ b/reference/ios/basic_ios/op_bool.md @@ -17,10 +17,10 @@ explicit operator bool() const; ## 備考 - 本関数と [`good`](good.md)`()` は結果が異なる事に注意。本関数は `eofbit` が設定されていても `true` を返すが、[`good`](good.md)`()` は `eofbit` がセットされている場合 `false` を返す。 -- C++03 までは本関数とほぼ等価の機能が [`operator void*`](op_voidptr.md)`()` によって提供されていたが、C++11 でユーザ定義変換関数に `explicit` を指定することで当該変換の暗黙適用を回避できるようになったことから、より意図が明確となるように本関数が提供され、[`operator void*`](op_voidptr.md)`()` は廃止された。 - なお、`if` 文や `while` 文の条件式で使用している分には問題とならないが、この変更によって一部 C++03 までは問題の無かったコードがコンパイルエラーとなる等の非互換が生じている。 +- C++98 までは本関数とほぼ等価の機能が [`operator void*`](op_voidptr.md)`()` によって提供されていたが、C++11 でユーザ定義変換関数に `explicit` を指定することで当該変換の暗黙適用を回避できるようになったことから、より意図が明確となるように本関数が提供され、[`operator void*`](op_voidptr.md)`()` は廃止された。 + なお、`if` 文や `while` 文の条件式で使用している分には問題とならないが、この変更によって一部 C++98 までは問題の無かったコードがコンパイルエラーとなる等の非互換が生じている。 ```cpp - // C++03 まではコンパイル可能だが C++11 からはコンパイルエラーになる例 + // C++98 まではコンパイル可能だが C++11 からはコンパイルエラーになる例 bool b1 = std::cout; bool b2 = std::cout == NULL; ``` diff --git a/reference/ios/basic_ios/op_constructor.md b/reference/ios/basic_ios/op_constructor.md index c004554b81..1140120eed 100644 --- a/reference/ios/basic_ios/op_constructor.md +++ b/reference/ios/basic_ios/op_constructor.md @@ -12,7 +12,7 @@ protected: basic_ios(); // (2) private: - basic_ios(basic_ios&); // (3) 宣言のみ、C++03 まで + basic_ios(basic_ios&); // (3) 宣言のみ、C++98 まで public: basic_ios(basic_ios&) = delete; // (3) C++11 から ``` @@ -34,7 +34,7 @@ public: ## 備考 - コピーコンストラクタは、 - - C++03 : アクセス指定子`private`で宣言のみされ、定義はされない + - C++98 : アクセス指定子`private`で宣言のみされ、定義はされない - C++11 : アクセス指定子`public`で`delete`定義される (いずれにせよコピーすることはできないが、`public` で `delete` の方が誤ってコピーしようとした際のエラーメッセージが分かりやすいため、変更されている) - コピーコンストラクタが宣言されているため、ムーブコンストラクタも自動生成されない。 diff --git a/reference/ios/basic_ios/op_voidptr.md b/reference/ios/basic_ios/op_voidptr.md index a0c3583579..c440c29044 100644 --- a/reference/ios/basic_ios/op_voidptr.md +++ b/reference/ios/basic_ios/op_voidptr.md @@ -17,10 +17,10 @@ operator void*() const; ## 備考 - 本関数と [`good`](good.md)`()` は結果が異なる事に注意。本関数は `eofbit` が設定されていても非ヌルポインタ(つまり真)を返すが、[`good`](good.md)`()` は `eofbit` が設定されている場合 `false` を返す。 -- C++03 までは本関数によって [`basic_ios`](../basic_ios.md) を条件式の文脈等で明示的な変換無しに使用することができるようにしていたが、C++11 でユーザ定義変換関数に `explicit` を指定することで当該変換の暗黙適用を回避できるようになったことから、より意図が明確となるように [`operator bool`](op_bool.md)`()` が提供され、本関数は廃止された。 - なお、`if` 文や `while` 文の条件式で使用している分には問題とならないが、この変更によって一部 C++03 までは問題の無かったコードがコンパイルエラーとなる等の非互換が生じている。 +- C++98 までは本関数によって [`basic_ios`](../basic_ios.md) を条件式の文脈等で明示的な変換無しに使用することができるようにしていたが、C++11 でユーザ定義変換関数に `explicit` を指定することで当該変換の暗黙適用を回避できるようになったことから、より意図が明確となるように [`operator bool`](op_bool.md)`()` が提供され、本関数は廃止された。 + なお、`if` 文や `while` 文の条件式で使用している分には問題とならないが、この変更によって一部 C++98 までは問題の無かったコードがコンパイルエラーとなる等の非互換が生じている。 ```cpp - // C++03 まではコンパイル可能だが C++11 からはコンパイルエラーになる例 + // C++98 まではコンパイル可能だが C++11 からはコンパイルエラーになる例 bool b1 = std::cout; bool b2 = std::cout == NULL; ``` @@ -37,7 +37,7 @@ explicit operator void*() const { ## バージョン ### 言語 -- C++03 まで +- C++98 まで ### 備考 libc++ には C++03 モードでも本関数は存在しない。 diff --git a/reference/ios/basic_ios/tie.md b/reference/ios/basic_ios/tie.md index e272aba941..c4964dfc55 100644 --- a/reference/ios/basic_ios/tie.md +++ b/reference/ios/basic_ios/tie.md @@ -35,7 +35,7 @@ basic_ostream* tie(basic_ostream* tiestr); // ( なお、この動作は、[`basic_istream`](../../istream/basic_istream.md)`::`[`sentry`](../../istream/basic_istream/sentry.md)`::`[`sentry`](../../istream/basic_istream/sentry/op_constructor.md)、および、[`basic_ostream`](../../ostream/basic_ostream.md)`::`[`sentry`](../../ostream/basic_ostream/sentry.md)`::`[`sentry`](../../ostream/basic_ostream/sentry/op_constructor.md) によって引き起こされる。 - 上記の要件欄の記載は C++11 で追加されたが、これは、[`basic_ostream`](../../ostream/basic_ostream.md)`::`[`flush`](../../ostream/basic_ostream/flush.md)`()` が非書式化出力であることによる。 ([`basic_ostream`](../../ostream/basic_ostream.md)`::`[`flush`](../../ostream/basic_ostream/flush.md)`()` が `tie()` で指定された出力ストリームのフラッシュを引き起こし、それが次のフラッシュを引き起こし…となり、無限ループを引き起こしてしまうため) - したがって、明記はされていないものの C++03 まででも必要な要件であるものと思われる。(C++03 では、[`basic_ostream`](../../ostream/basic_ostream.md)`::`[`flush`](../../ostream/basic_ostream/flush.md)`()` が非書式化出力ではない旨の記載が追加されたが、これは誤りということで C++11 で修正された) + したがって、明記はされていないものの C++98 まででも必要な要件であるものと思われる。(C++03 では、[`basic_ostream`](../../ostream/basic_ostream.md)`::`[`flush`](../../ostream/basic_ostream/flush.md)`()` が非書式化出力ではない旨の記載が追加されたが、これは誤りということで C++11 で修正された) なお、この要件は「`tie` に設定した後でこのようになってはいけない」という意味であるものと思われる。(さもないと、設定したことによって無限ループが生じることを防げない) - 標準入出力ストリームは、以下のような設定が行われている。 - [`cin`](../../iostream/cin.md)`.tie() == &`[`cout`](../../iostream/cout.md) @@ -109,7 +109,7 @@ new ## 参照 - [60. What is a formatted input function?](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60) - C++03 で [`basic_ostream`](../../ostream/basic_ostream.md)`::`[`flush`](../../ostream/basic_ostream/flush.md)`()` が非書式化出力ではないと明記された Defect Report + C++03 で [`basic_ostream`](../../ostream/basic_ostream.md)`::`[`flush`](../../ostream/basic_ostream/flush.md)`()` が非書式化出力ではないと明記された Defect Report(Status: TC1) - [581. flush() not unformatted function](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#581) 上記の Defect Report で非書式化出力ではなくなってしまった [`basic_ostream`](../../ostream/basic_ostream.md)`::`[`flush`](../../ostream/basic_ostream/flush.md)`()` を非書式化出力に変更する Defect Report - [835. Tying two streams together (correction to DR 581)](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#835) diff --git a/reference/ios/boolalpha.md b/reference/ios/boolalpha.md index 68385be870..cca83b1f6b 100644 --- a/reference/ios/boolalpha.md +++ b/reference/ios/boolalpha.md @@ -36,7 +36,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`noboolalpha`](noboolalpha.md) diff --git a/reference/ios/dec.md b/reference/ios/dec.md index 5b875ae20e..369c88a150 100644 --- a/reference/ios/dec.md +++ b/reference/ios/dec.md @@ -61,7 +61,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`oct`](oct.md) diff --git a/reference/ios/defaultfloat.md b/reference/ios/defaultfloat.md index 30a7096ebb..bf8f1f7966 100644 --- a/reference/ios/defaultfloat.md +++ b/reference/ios/defaultfloat.md @@ -67,7 +67,7 @@ defaultfloat fixed scientific hexfloat ``` ## 実装例 -この実装はC++03の下でも可能である。 +この実装はC++98の下でも可能である。 ```cpp namespace std { ios_base& defaultfloat(ios_base& str) { diff --git a/reference/ios/fixed.md b/reference/ios/fixed.md index 05eacc1efa..e09b708a16 100644 --- a/reference/ios/fixed.md +++ b/reference/ios/fixed.md @@ -23,7 +23,7 @@ namespace std { ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`defaultfloat`](defaultfloat.md) diff --git a/reference/ios/fpos.md b/reference/ios/fpos.md index 528efa127f..d17e8b69ad 100644 --- a/reference/ios/fpos.md +++ b/reference/ios/fpos.md @@ -43,8 +43,8 @@ using u32streampos = fpos::state_type>; | `P p = i;` | 〃 | 〃 | | `P(o)` | オフセットからの(一時)オブジェクトの生成 | | | `O(p)` | オフセットへの変換 | `P(O(p)) == p` | -| `p == q` | 比較 | C++03 : 結果の型は`bool`に変換可能である
C++23 : 戻り値の型は`bool`。`p`, `q`をそれぞれ値`o`, `o2`から得たとき、`o == o2`のとき、かつそのときに限り`true` | -| `p != q` | 〃 | C++03 : 結果の型は`bool`に変換可能である
C++23 : 戻り値の型は`bool`。`!(p == q)` | +| `p == q` | 比較 | C++98 : 結果の型は`bool`に変換可能である
C++23 : 戻り値の型は`bool`。`p`, `q`をそれぞれ値`o`, `o2`から得たとき、`o == o2`のとき、かつそのときに限り`true` | +| `p != q` | 〃 | C++98 : 結果の型は`bool`に変換可能である
C++23 : 戻り値の型は`bool`。`!(p == q)` | | `q = p + o` | 正値のオフセット | `q - o == p` | | `p += o` | 〃 | 〃 | | `q = p - o` | | `q + o == p` | diff --git a/reference/ios/hex.md b/reference/ios/hex.md index b838f34a5b..11cbb75403 100644 --- a/reference/ios/hex.md +++ b/reference/ios/hex.md @@ -23,7 +23,7 @@ namespace std { ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`oct`](oct.md) diff --git a/reference/ios/internal.md b/reference/ios/internal.md index 8b3723bb83..0fdcb93328 100644 --- a/reference/ios/internal.md +++ b/reference/ios/internal.md @@ -30,7 +30,7 @@ namespace std { ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`left`](left.md) diff --git a/reference/ios/ios_base.md b/reference/ios/ios_base.md index 53bc93b1c2..a645a0c05e 100644 --- a/reference/ios/ios_base.md +++ b/reference/ios/ios_base.md @@ -22,7 +22,7 @@ namespace std { | [`operator=`](ios_base/op_assign.md) | 代入演算子 | | なお、コピーコンストラクタとコピー代入演算子はdelete定義されている。 -C++03では、delete定義の代わりに`private`で宣言のみされていた。 +C++98では、delete定義の代わりに`private`で宣言のみされていた。 ### 書式化 diff --git a/reference/ios/ios_base/failure.md b/reference/ios/ios_base/failure.md index 4c18841b85..08ac8dfc9f 100644 --- a/reference/ios/ios_base/failure.md +++ b/reference/ios/ios_base/failure.md @@ -6,7 +6,7 @@ ```cpp namespace std { - // C++03 まで + // C++98 まで class ios_base::failure : public exception { public: explicit failure(const string& msg); @@ -42,18 +42,18 @@ C++11 からは、エラー内容としてメッセージだけではなく、[` | 名前 | 説明 | 対応バージョン | |----------------------------------------------|------------------------|----------------| | [`(constructor)`](failure/op_constructor.md) | コンストラクタ | | -| [`what`](failure/what.md) | エラーメッセージの取得 | C++03 まで | +| [`what`](failure/what.md) | エラーメッセージの取得 | C++98 まで | なお、一見 C++11 で `what()` が無くなっているように見えるが、[`system_error`](../../system_error/system_error.md)`::what()` を継承しているため、メンバ関数自体は使用可能である。 ## 備考 - [`ios_base`](../ios_base.md)`::failure` は、C++11 から基底クラスが変更になっている。 - このため、C++03 まででも使用可能とするためには、基底クラスが [`system_error`](../../system_error/system_error.md) であることに依存しないようにする必要がある。 + このため、C++98 まででも使用可能とするためには、基底クラスが [`system_error`](../../system_error/system_error.md) であることに依存しないようにする必要がある。 なお、C++ 標準規格では、ライブラリの各クラスは基底クラスを直接継承しなくても(間接的に継承していれば)良いことになっている。 - このため、C++03 でも [`exception`](../../exception/exception.md) から直接派生していないかもしれないので、注意。 + このため、C++98 でも [`exception`](../../exception/exception.md) から直接派生していないかもしれないので、注意。 (当然 C++11 でも [`system_error`](../../system_error/system_error.md) を直接継承していない可能性がある) -- C++03 まではデストラクタが宣言されていたが、例外指定が誤っていたため(基底クラス [`exception`](../../exception/exception.md) のデストラクタには `throw()` が付いているため、派生クラスにも `throw()` が必要)、C++11 では宣言自体が削除された。 +- C++98 まではデストラクタが宣言されていたが、例外指定が誤っていたため(基底クラス [`exception`](../../exception/exception.md) のデストラクタには `throw()` が付いているため、派生クラスにも `throw()` が必要)、C++11 では宣言自体が削除された。 - C++17 からは、[`ios_base`](../ios_base.md)`::failure` を、クラスとして定義するのではなく、[`system_error`](../../system_error/system_error.md) から派生したクラスへの別名(シノニム)として定義してもよいことになっている。これは、規格バージョン間でABIの互換性を保つ柔軟性を処理系に与えるためである。 このため、`class std::ios_base::failure` のような elaborated-type-specifier が使用できるとは限らない。 diff --git a/reference/ios/ios_base/failure/op_constructor.md b/reference/ios/ios_base/failure/op_constructor.md index 7d69e89ebe..3cab723b1d 100644 --- a/reference/ios/ios_base/failure/op_constructor.md +++ b/reference/ios/ios_base/failure/op_constructor.md @@ -5,7 +5,7 @@ * ios_base::failure[meta class] ```cpp -explicit failure(const std::string& msg); // (1) C++03 まで +explicit failure(const std::string& msg); // (1) C++98 まで explicit failure(const std::string& msg, const error_code& ec = io_errc::stream); // (2) C++11 から @@ -24,7 +24,7 @@ explicit failure(const char* msg, const error_code& ec = io_errc::stream); ## 例 -### C++03 までの例 +### C++98 までの例 ```cpp example #include @@ -82,7 +82,7 @@ error message: No such file or directory ### 備考 - GCC 5.1.0 以降では、単に C++03 モードにしても [`strcmp`](../../../cstring/strcmp.md)`(`[`what`](what.md)`(), msg.`[`c_str`](../../../string/basic_string/c_str.md)`()) == 0` にはならない。 - マクロ `_GLIBCXX_USE_CXX11_ABI` を `0`に設定すれば完全に C++03 の挙動になる。 + マクロ `_GLIBCXX_USE_CXX11_ABI` を `0`に設定すれば完全に C++98 の挙動になる。 [クラスページ](../failure.md)のバージョン欄の備考も参照。 - Clang では、C++03 モードでも [`strcmp`](../../../cstring/strcmp.md)`(`[`what`](what.md)`(), msg.`[`c_str`](../../../string/basic_string/c_str.md)`()) == 0` にはならない。 diff --git a/reference/ios/ios_base/failure/what.md b/reference/ios/ios_base/failure/what.md index 85ecf356c5..3be9a8eb23 100644 --- a/reference/ios/ios_base/failure/what.md +++ b/reference/ios/ios_base/failure/what.md @@ -5,7 +5,7 @@ * ios_base::failure[meta class] ```cpp -virtual const char* what() const throw(); // C++03 まで +virtual const char* what() const throw(); // C++98 まで ``` ## 概要 @@ -53,7 +53,7 @@ error message ### 備考 - GCC 5.1.0 以降では、単に C++03 モードにしても [`strcmp`](../../../cstring/strcmp.md)`(what(), msg.`[`c_str`](../../../string/basic_string/c_str.md)`()) == 0` にはならない。 - どうしても C++03 の挙動にしたい場合には、コンパイルオプションに `-D_GLIBCXX_USE_CXX11_ABI=0` を指定する必要がある。 + どうしても C++98 の挙動にしたい場合には、コンパイルオプションに `-D_GLIBCXX_USE_CXX11_ABI=0` を指定する必要がある。 - Clang では、C++03 モードでも [`strcmp`](../../../cstring/strcmp.md)`(what(), msg.`[`c_str`](../../../string/basic_string/c_str.md)`()) == 0` にはならない。 diff --git a/reference/ios/ios_base/op_assign.md b/reference/ios/ios_base/op_assign.md index e8bd033f70..f5fdb58a46 100644 --- a/reference/ios/ios_base/op_assign.md +++ b/reference/ios/ios_base/op_assign.md @@ -6,7 +6,7 @@ ```cpp private: - ios_base& operator=(const ios_base&); // 宣言のみ、C++03 まで + ios_base& operator=(const ios_base&); // 宣言のみ、C++98 まで public: ios_base& operator=(const ios_base&) = delete; // C++11 から ``` @@ -22,7 +22,7 @@ public: ## 備考 - コピー代入演算子は、 - - C++03 : アクセス指定子`private`で宣言のみされ、定義はされない + - C++98 : アクセス指定子`private`で宣言のみされ、定義はされない - C++11 : アクセス指定子`public`で`delete`定義される (いずれにせよコピーすることはできないが、`public` で `delete` の方が誤ってコピーしようとした際のエラーメッセージが分かりやすいため、変更されている) - コピー代入演算子が宣言されているため、ムーブ代入演算子も自動生成されない。 diff --git a/reference/ios/ios_base/op_constructor.md b/reference/ios/ios_base/op_constructor.md index 0329f1c962..731f0704d8 100644 --- a/reference/ios/ios_base/op_constructor.md +++ b/reference/ios/ios_base/op_constructor.md @@ -8,7 +8,7 @@ protected: ios_base(); // (1) private: - ios_base(const ios_base&); // (2) 宣言のみ、C++03 まで + ios_base(const ios_base&); // (2) 宣言のみ、C++98 まで public: ios_base(const ios_base&) = delete; // (2) C++11 から ``` @@ -30,7 +30,7 @@ public: - コンストラクタが `protected` であることからも分かるとおり、[`ios_base`](../ios_base.md) は直接使用するのではなく継承されることを想定している。 通常は、[`ios_base`](../ios_base.md)、あるいは、その直接の派生クラスである [`basic_ios`](../basic_ios.md) を直接継承するのではなく、[`basic_istream`](../../istream/basic_istream.md)、[`basic_ostream`](../../ostream/basic_ostream.md)、[`basic_iostream`](../../istream/basic_iostream.md) のいずれかを継承することになるだろう。 - コピーコンストラクタは、 - - C++03 : アクセス指定子`private`で宣言のみされ、定義はされない + - C++98 : アクセス指定子`private`で宣言のみされ、定義はされない - C++11 : アクセス指定子`public`で`delete`定義される (いずれにせよコピーすることはできないが、`public` で `delete` の方が誤ってコピーしようとした際のエラーメッセージが分かりやすいため、変更されている) - コピーコンストラクタが宣言されているため、ムーブコンストラクタも自動生成されない。 diff --git a/reference/ios/ios_base/type-fmtflags.md b/reference/ios/ios_base/type-fmtflags.md index b2e4f08a06..cc0ac652b2 100644 --- a/reference/ios/ios_base/type-fmtflags.md +++ b/reference/ios/ios_base/type-fmtflags.md @@ -43,7 +43,7 @@ using fmtflags = T1; | `floatfield` | scientific | fixed | さらに、直接の定数は存在しないが、C++11 からは `fixed | scientific` の組み合わせで 16 進浮動小数点出力を行う。 -(16 進浮動小数点出力が、より直観的な `hex` との組み合わせを使用しないのは、C++03 までとの互換性のため) +(16 進浮動小数点出力が、より直観的な `hex` との組み合わせを使用しないのは、C++98 までとの互換性のため) ## 備考 diff --git a/reference/ios/left.md b/reference/ios/left.md index 27fa3b73b4..e14c01362b 100644 --- a/reference/ios/left.md +++ b/reference/ios/left.md @@ -46,7 +46,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`internal`](internal.md) diff --git a/reference/ios/noboolalpha.md b/reference/ios/noboolalpha.md index 78f06bf475..2976e8d87e 100644 --- a/reference/ios/noboolalpha.md +++ b/reference/ios/noboolalpha.md @@ -38,7 +38,7 @@ false ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`boolalpha`](boolalpha.md) diff --git a/reference/ios/noshowbase.md b/reference/ios/noshowbase.md index 2f4eeef168..2ae9f691d6 100644 --- a/reference/ios/noshowbase.md +++ b/reference/ios/noshowbase.md @@ -44,7 +44,7 @@ f ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`showbase`](showbase.md) diff --git a/reference/ios/noshowpoint.md b/reference/ios/noshowpoint.md index 0cb3a631f0..8b2005d8d9 100644 --- a/reference/ios/noshowpoint.md +++ b/reference/ios/noshowpoint.md @@ -43,7 +43,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`showpoint`](showpoint.md) diff --git a/reference/ios/noshowpos.md b/reference/ios/noshowpos.md index 90d43137c9..186d9cc12c 100644 --- a/reference/ios/noshowpos.md +++ b/reference/ios/noshowpos.md @@ -40,7 +40,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`showpos`](showpos.md) diff --git a/reference/ios/noskipws.md b/reference/ios/noskipws.md index 3fb7a38eb1..c863cd04c8 100644 --- a/reference/ios/noskipws.md +++ b/reference/ios/noskipws.md @@ -50,7 +50,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`skipws`](skipws.md) diff --git a/reference/ios/nounitbuf.md b/reference/ios/nounitbuf.md index dfd8e7dacc..87fb48dd6a 100644 --- a/reference/ios/nounitbuf.md +++ b/reference/ios/nounitbuf.md @@ -44,7 +44,7 @@ test ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`unitbuf`](unitbuf.md) diff --git a/reference/ios/nouppercase.md b/reference/ios/nouppercase.md index 2abf4125a6..2d171939e9 100644 --- a/reference/ios/nouppercase.md +++ b/reference/ios/nouppercase.md @@ -42,7 +42,7 @@ beef ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`uppercase`](uppercase.md) diff --git a/reference/ios/oct.md b/reference/ios/oct.md index d3c030593c..476fdbced5 100644 --- a/reference/ios/oct.md +++ b/reference/ios/oct.md @@ -23,7 +23,7 @@ namespace std { ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`dec`](dec.md) diff --git a/reference/ios/right.md b/reference/ios/right.md index 42e3c90034..fd8d7ce91e 100644 --- a/reference/ios/right.md +++ b/reference/ios/right.md @@ -25,7 +25,7 @@ namespace std { ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`internal`](internal.md) diff --git a/reference/ios/scientific.md b/reference/ios/scientific.md index b6af309269..e397010da1 100644 --- a/reference/ios/scientific.md +++ b/reference/ios/scientific.md @@ -23,7 +23,7 @@ namespace std { ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`defaultfloat`](defaultfloat.md) diff --git a/reference/ios/showbase.md b/reference/ios/showbase.md index 7713ce33aa..0ad9fef48f 100644 --- a/reference/ios/showbase.md +++ b/reference/ios/showbase.md @@ -54,7 +54,7 @@ f 0 ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`noshowbase`](noshowbase.md) diff --git a/reference/ios/showpoint.md b/reference/ios/showpoint.md index c919fe31e7..97301dc537 100644 --- a/reference/ios/showpoint.md +++ b/reference/ios/showpoint.md @@ -41,7 +41,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`noshowpoint`](noshowpoint.md) diff --git a/reference/ios/showpos.md b/reference/ios/showpos.md index e44d59c734..d6218f1326 100644 --- a/reference/ios/showpos.md +++ b/reference/ios/showpos.md @@ -37,7 +37,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`noshowpos`](noshowpos.md) diff --git a/reference/ios/skipws.md b/reference/ios/skipws.md index 5c87ae1363..7ba2603eb0 100644 --- a/reference/ios/skipws.md +++ b/reference/ios/skipws.md @@ -50,7 +50,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`noskipws`](noskipws.md) diff --git a/reference/ios/type-streamoff.md b/reference/ios/type-streamoff.md index 49c2af7c1e..53b314857e 100644 --- a/reference/ios/type-streamoff.md +++ b/reference/ios/type-streamoff.md @@ -12,4 +12,4 @@ namespace std { `streamoff`は、処理系依存の符号つき整数型の別名である。ファイルサイズとして有り得る最大値を表現できることとされている。 典型的には、`long long`型の別名であることが想定される。 -ただし、C++03に準拠した実装では`long`型の別名であるものも存在するため、注意が必要である。C++03では`long long`型が存在しなかったためである。 +ただし、C++98に準拠した実装では`long`型の別名であるものも存在するため、注意が必要である。C++98では`long long`型が存在しなかったためである。 diff --git a/reference/ios/unitbuf.md b/reference/ios/unitbuf.md index 589c828de9..fabf624fa9 100644 --- a/reference/ios/unitbuf.md +++ b/reference/ios/unitbuf.md @@ -61,7 +61,7 @@ ABC ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`nounitbuf`](nounitbuf.md) diff --git a/reference/ios/uppercase.md b/reference/ios/uppercase.md index d238ac8b1b..df07765561 100644 --- a/reference/ios/uppercase.md +++ b/reference/ios/uppercase.md @@ -46,7 +46,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 参照 - [`nouppercase`](nouppercase.md) diff --git a/reference/istream/basic_istream/gcount.md b/reference/istream/basic_istream/gcount.md index b1d0d0c617..522d7ae4ab 100644 --- a/reference/istream/basic_istream/gcount.md +++ b/reference/istream/basic_istream/gcount.md @@ -16,7 +16,7 @@ streamsize gcount(); 入力文字数が[`streamsize`](/reference/ios/type-streamsize.md)で表現できる範囲を超える場合の扱いは、バージョンによって異なる。 -- C++03 : 規定されていない +- C++98 : 規定されていない - C++23 : その文字数が[`numeric_limits`](/reference/limits/numeric_limits.md)`<`[`streamsize`](/reference/ios/type-streamsize.md)`>::`[`max()`](/reference/limits/numeric_limits/max.md)を超える場合は、[`numeric_limits`](/reference/limits/numeric_limits.md)`<`[`streamsize`](/reference/ios/type-streamsize.md)`>::`[`max()`](/reference/limits/numeric_limits/max.md)を返す ## 例 diff --git a/reference/istream/basic_istream/op_istream.md b/reference/istream/basic_istream/op_istream.md index 54f4589cf5..f68fe45c95 100644 --- a/reference/istream/basic_istream/op_istream.md +++ b/reference/istream/basic_istream/op_istream.md @@ -8,32 +8,32 @@ // マニピュレータ // 3つとも関数へのポインタを引数に取る。 basic_istream& - operator>>(basic_istream& (*pf)(basic_istream&)); // (1) C++03 + operator>>(basic_istream& (*pf)(basic_istream&)); // (1) C++98 basic_istream& - operator>>(basic_ios& (*pf)(basic_ios&)); // (2) C++03 + operator>>(basic_ios& (*pf)(basic_ios&)); // (2) C++98 basic_istream& - operator>>(ios_base& (*pf)(ios_base&)); // (3) C++03 + operator>>(ios_base& (*pf)(ios_base&)); // (3) C++98 // bool値・数値・ポインタ -basic_istream& operator>>(bool& n); // (4) C++03 -basic_istream& operator>>(short& n); // (5) C++03 -basic_istream& operator>>(unsigned short& n); // (6) C++03 -basic_istream& operator>>(int& n); // (7) C++03 -basic_istream& operator>>(unsigned int& n); // (8) C++03 -basic_istream& operator>>(long& n); // (9) C++03 -basic_istream& operator>>(unsigned long& n); // (10) C++03 +basic_istream& operator>>(bool& n); // (4) C++98 +basic_istream& operator>>(short& n); // (5) C++98 +basic_istream& operator>>(unsigned short& n); // (6) C++98 +basic_istream& operator>>(int& n); // (7) C++98 +basic_istream& operator>>(unsigned int& n); // (8) C++98 +basic_istream& operator>>(long& n); // (9) C++98 +basic_istream& operator>>(unsigned long& n); // (10) C++98 basic_istream& operator>>(long long& n); // (11) C++11 basic_istream& operator>>(unsigned long long& n); // (12) C++11 -basic_istream& operator>>(float& f); // (13) C++03 -basic_istream& operator>>(double& f); // (14) C++03 -basic_istream& operator>>(long double& f); // (15) C++03 +basic_istream& operator>>(float& f); // (13) C++98 +basic_istream& operator>>(double& f); // (14) C++98 +basic_istream& operator>>(long double& f); // (15) C++98 basic_istream& operator>>(extended-floating-point-type& f); // (16) C++23 -basic_istream& operator>>(void*& p); // (17) C++03 +basic_istream& operator>>(void*& p); // (17) C++98 // ストリームバッファ basic_istream& - operator>>(basic_streambuf* sb); // (18) C++03 + operator>>(basic_streambuf* sb); // (18) C++98 ``` ## 概要 diff --git a/reference/istream/basic_istream/op_istream_free.md b/reference/istream/basic_istream/op_istream_free.md index 6de6e41c68..a9f92b0dc9 100644 --- a/reference/istream/basic_istream/op_istream_free.md +++ b/reference/istream/basic_istream/op_istream_free.md @@ -7,23 +7,23 @@ namespace std { // 文字 template - basic_istream& operator>>(basic_istream& is, CharT& c); // (1) C++03 + basic_istream& operator>>(basic_istream& is, CharT& c); // (1) C++98 template - basic_istream& operator>>(basic_istream& is, unsigned char& c); // (2) C++03 + basic_istream& operator>>(basic_istream& is, unsigned char& c); // (2) C++98 template - basic_istream& operator>>(basic_istream& is, signed char& c); // (3) C++03 + basic_istream& operator>>(basic_istream& is, signed char& c); // (3) C++98 // 文字列 template - basic_istream& operator>>(basic_istream& is, CharT* c); // (4) C++03 + basic_istream& operator>>(basic_istream& is, CharT* c); // (4) C++98 template basic_istream& operator>>(basic_istream& is, CharT (&s)[N]); // (4) C++20 template - basic_istream& operator>>(basic_istream& is, unsigned char* c); // (5) C++03 + basic_istream& operator>>(basic_istream& is, unsigned char* c); // (5) C++98 template basic_istream& operator>>(basic_istream& is, unsigned char (&s)[N]); // (5) C++20 template - basic_istream& operator>>(basic_istream& is, signed char* c); // (6) C++03 + basic_istream& operator>>(basic_istream& is, signed char* c); // (6) C++98 template basic_istream& operator>>(basic_istream& is, signed char (&s)[N]); // (6) C++20 @@ -70,7 +70,7 @@ namespace std { ### 文字列 -- C++03 : 文字型`CharT`の配列の要素を指し示すポインタを実引数として受け取る +- C++98 : 文字型`CharT`の配列の要素を指し示すポインタを実引数として受け取る - ただし、`CharT`が`char`の場合に限り、`unsigned char`および`signed char`の配列の要素を指し示すポインタも受け付ける - C++20 : 文字型`CharT`の要素数が判明している配列への参照を受け取る diff --git a/reference/iterator/advance.md b/reference/iterator/advance.md index b79e579963..36be2c32a6 100644 --- a/reference/iterator/advance.md +++ b/reference/iterator/advance.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - void advance(InputIterator& i, Distance n); // C++03 + void advance(InputIterator& i, Distance n); // C++98 template constexpr void advance(InputIterator& i, Distance n); // C++17 diff --git a/reference/iterator/back_insert_iterator/op_assign.md b/reference/iterator/back_insert_iterator/op_assign.md index 33affa869c..9b38b3c5e5 100644 --- a/reference/iterator/back_insert_iterator/op_assign.md +++ b/reference/iterator/back_insert_iterator/op_assign.md @@ -6,7 +6,7 @@ ```cpp back_insert_iterator& - operator=(const typename Container::value_type& value); // (1) C++03 + operator=(const typename Container::value_type& value); // (1) C++98 constexpr back_insert_iterator& operator=(const typename Container::value_type& value); // (1) C++20 diff --git a/reference/iterator/back_insert_iterator/op_constructor.md b/reference/iterator/back_insert_iterator/op_constructor.md index 8279fdadbf..9e33f8a546 100644 --- a/reference/iterator/back_insert_iterator/op_constructor.md +++ b/reference/iterator/back_insert_iterator/op_constructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -explicit back_insert_iterator(Container& x); // C++03 +explicit back_insert_iterator(Container& x); // C++98 explicit constexpr back_insert_iterator(Container& x); // C++20 ``` diff --git a/reference/iterator/back_insert_iterator/op_deref.md b/reference/iterator/back_insert_iterator/op_deref.md index 13c74bbd36..835ed53136 100644 --- a/reference/iterator/back_insert_iterator/op_deref.md +++ b/reference/iterator/back_insert_iterator/op_deref.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -back_insert_iterator& operator*(); // (1) C++03 +back_insert_iterator& operator*(); // (1) C++98 constexpr back_insert_iterator& operator*(); // (1) C++20 ``` diff --git a/reference/iterator/back_insert_iterator/op_increment.md b/reference/iterator/back_insert_iterator/op_increment.md index 5bf7141a67..b4573b92cd 100644 --- a/reference/iterator/back_insert_iterator/op_increment.md +++ b/reference/iterator/back_insert_iterator/op_increment.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -back_insert_iterator& operator++(); // (1) C++03 +back_insert_iterator& operator++(); // (1) C++98 constexpr back_insert_iterator& operator++(); // (1) C++20 -back_insert_iterator operator++(int); // (2) C++03 +back_insert_iterator operator++(int); // (2) C++98 constexpr back_insert_iterator operator++(int); // (2) C++20 ``` diff --git a/reference/iterator/back_inserter.md b/reference/iterator/back_inserter.md index a849a08174..0ec1015f7c 100644 --- a/reference/iterator/back_inserter.md +++ b/reference/iterator/back_inserter.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - back_insert_iterator back_inserter(Container& x); // (1) C++03 + back_insert_iterator back_inserter(Container& x); // (1) C++98 template constexpr back_insert_iterator back_inserter(Container& x); // (1) C++20 diff --git a/reference/iterator/distance.md b/reference/iterator/distance.md index 3c339a7af1..de63d57084 100644 --- a/reference/iterator/distance.md +++ b/reference/iterator/distance.md @@ -7,7 +7,7 @@ namespace std { template typename iterator_traits::difference_type - distance(InputIterator first, InputIterator last); // C++03 + distance(InputIterator first, InputIterator last); // C++98 template constexpr typename iterator_traits::difference_type diff --git a/reference/iterator/front_insert_iterator/op_assign.md b/reference/iterator/front_insert_iterator/op_assign.md index 45ee2f0cf8..a85d529df8 100644 --- a/reference/iterator/front_insert_iterator/op_assign.md +++ b/reference/iterator/front_insert_iterator/op_assign.md @@ -6,7 +6,7 @@ ```cpp front_insert_iterator& - operator=(const typename Container::value_type& value); // (1) C++03 + operator=(const typename Container::value_type& value); // (1) C++98 constexpr front_insert_iterator& operator=(const typename Container::value_type& value); // (1) C++20 diff --git a/reference/iterator/front_insert_iterator/op_constructor.md b/reference/iterator/front_insert_iterator/op_constructor.md index 7ca62ea6b7..8cb12e3d79 100644 --- a/reference/iterator/front_insert_iterator/op_constructor.md +++ b/reference/iterator/front_insert_iterator/op_constructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -explicit front_insert_iterator(Container& x); // C++03 +explicit front_insert_iterator(Container& x); // C++98 explicit constexpr front_insert_iterator(Container& x); // C++20 ``` diff --git a/reference/iterator/front_insert_iterator/op_deref.md b/reference/iterator/front_insert_iterator/op_deref.md index 501442c562..2892b8b550 100644 --- a/reference/iterator/front_insert_iterator/op_deref.md +++ b/reference/iterator/front_insert_iterator/op_deref.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -front_insert_iterator& operator*(); // (1) C++03 +front_insert_iterator& operator*(); // (1) C++98 constexpr front_insert_iterator& operator*(); // (1) C++20 ``` diff --git a/reference/iterator/front_insert_iterator/op_increment.md b/reference/iterator/front_insert_iterator/op_increment.md index 3d34d25426..568497b702 100644 --- a/reference/iterator/front_insert_iterator/op_increment.md +++ b/reference/iterator/front_insert_iterator/op_increment.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -front_insert_iterator& operator++(); // (1) C++03 +front_insert_iterator& operator++(); // (1) C++98 constexpr front_insert_iterator& operator++(); // (1) C++20 -front_insert_iterator operator++(int); // (2) C++03 +front_insert_iterator operator++(int); // (2) C++98 constexpr front_insert_iterator operator++(int); // (2) C++20 ``` diff --git a/reference/iterator/front_inserter.md b/reference/iterator/front_inserter.md index c58d28fa54..7d1b89c28c 100644 --- a/reference/iterator/front_inserter.md +++ b/reference/iterator/front_inserter.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - front_insert_iterator front_inserter(Container& x); // (1) C++03 + front_insert_iterator front_inserter(Container& x); // (1) C++98 template constexpr front_insert_iterator front_inserter(Container& x); // (1) C++20 diff --git a/reference/iterator/insert_iterator/op_assign.md b/reference/iterator/insert_iterator/op_assign.md index fed5fefe46..211e1530dd 100644 --- a/reference/iterator/insert_iterator/op_assign.md +++ b/reference/iterator/insert_iterator/op_assign.md @@ -6,7 +6,7 @@ ```cpp insert_iterator& - operator=(const typename Container::value_type& value); // (1) C++03 + operator=(const typename Container::value_type& value); // (1) C++98 constexpr insert_iterator& operator=(const typename Container::value_type& value); // (1) C++20 diff --git a/reference/iterator/insert_iterator/op_constructor.md b/reference/iterator/insert_iterator/op_constructor.md index c015f8f4ba..87890b1e68 100644 --- a/reference/iterator/insert_iterator/op_constructor.md +++ b/reference/iterator/insert_iterator/op_constructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -insert_iterator(Container& x, typename Container::iterator i); // C++03 +insert_iterator(Container& x, typename Container::iterator i); // C++98 constexpr insert_iterator(Container& x, ranges::iterator_t i); // C++20 ``` diff --git a/reference/iterator/insert_iterator/op_deref.md b/reference/iterator/insert_iterator/op_deref.md index defe251d9d..ecae2bfa58 100644 --- a/reference/iterator/insert_iterator/op_deref.md +++ b/reference/iterator/insert_iterator/op_deref.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -insert_iterator& operator*(); // (1) C++03 +insert_iterator& operator*(); // (1) C++98 constexpr insert_iterator& operator*(); // (1) C++20 ``` diff --git a/reference/iterator/insert_iterator/op_increment.md b/reference/iterator/insert_iterator/op_increment.md index 6ec5a4f055..ca75773058 100644 --- a/reference/iterator/insert_iterator/op_increment.md +++ b/reference/iterator/insert_iterator/op_increment.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -insert_iterator& operator++(); // (1) C++03 +insert_iterator& operator++(); // (1) C++98 constexpr insert_iterator& operator++(); // (1) C++20 -insert_iterator& operator++(int); // (2) C++03 +insert_iterator& operator++(int); // (2) C++98 constexpr insert_iterator& operator++(int); // (2) C++20 ``` diff --git a/reference/iterator/inserter.md b/reference/iterator/inserter.md index 462d1fd27d..f3036e1331 100644 --- a/reference/iterator/inserter.md +++ b/reference/iterator/inserter.md @@ -7,7 +7,7 @@ namespace std { template insert_iterator - inserter(Container& x, typename Container::iterator i); // (1) C++03 + inserter(Container& x, typename Container::iterator i); // (1) C++98 template constexpr insert_iterator diff --git a/reference/iterator/istream_iterator/op_constructor.md b/reference/iterator/istream_iterator/op_constructor.md index faa5e29acc..622587ae85 100644 --- a/reference/iterator/istream_iterator/op_constructor.md +++ b/reference/iterator/istream_iterator/op_constructor.md @@ -5,14 +5,14 @@ * function[meta id-type] ```cpp -istream_iterator(); // (1) C++03 +istream_iterator(); // (1) C++98 constexpr istream_iterator(); // (1) C++11 constexpr istream_iterator(default_sentinel_t); // (2) C++20 istream_iterator(istream_type& s); // (3) -istream_iterator(const istream_iterator& x); // (4) C++03 +istream_iterator(const istream_iterator& x); // (4) C++98 istream_iterator(const istream_iterator& x) = default; // (4) C++11 constexpr istream_iterator(const istream_iterator& x) noexcept(see below); // (4) C++23 diff --git a/reference/iterator/istream_iterator/op_equal.md b/reference/iterator/istream_iterator/op_equal.md index 06cff122de..71f182e95b 100644 --- a/reference/iterator/istream_iterator/op_equal.md +++ b/reference/iterator/istream_iterator/op_equal.md @@ -7,7 +7,7 @@ namespace std { template bool operator==(const istream_iterator& x, - const istream_iterator& y); // (1) C++03 + const istream_iterator& y); // (1) C++98 template bool operator!=(const istream_iterator& x, - const istream_iterator& y); // (1) C++03 + const istream_iterator& y); // (1) C++98 template bool operator==(const istreambuf_iterator& a, - const istreambuf_iterator& b); // (1) C++03 + const istreambuf_iterator& b); // (1) C++98 template > diff --git a/reference/iterator/istreambuf_iterator/op_not_equal.md b/reference/iterator/istreambuf_iterator/op_not_equal.md index c567d8dd92..94453e3588 100644 --- a/reference/iterator/istreambuf_iterator/op_not_equal.md +++ b/reference/iterator/istreambuf_iterator/op_not_equal.md @@ -8,7 +8,7 @@ namespace std { // operator==により、以下の演算子が使用可能になる (C++20) template bool operator!=(const istreambuf_iterator& a, - const istreambuf_iterator& b); // (1) C++03 + const istreambuf_iterator& b); // (1) C++98 template > diff --git a/reference/iterator/iterator_traits.md b/reference/iterator/iterator_traits.md index 591f82e0e6..0f15eaf3a7 100644 --- a/reference/iterator/iterator_traits.md +++ b/reference/iterator/iterator_traits.md @@ -31,7 +31,7 @@ namespace std { struct iterator_traits { using difference_type = ptrdiff_t; - using value_type = T; // C++03 + using value_type = T; // C++98 using value_type = remove_cv_t; // C++17 using pointer = T*; diff --git a/reference/iterator/reverse_iterator/base.md b/reference/iterator/reverse_iterator/base.md index 11b6524e76..f7e52ffb6d 100644 --- a/reference/iterator/reverse_iterator/base.md +++ b/reference/iterator/reverse_iterator/base.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -Iterator base() const; // C++03 +Iterator base() const; // C++98 constexpr Iterator base() const; // C++17 ``` diff --git a/reference/iterator/reverse_iterator/op_arrow.md b/reference/iterator/reverse_iterator/op_arrow.md index 0728dbaa4d..17b879b48f 100644 --- a/reference/iterator/reverse_iterator/op_arrow.md +++ b/reference/iterator/reverse_iterator/op_arrow.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -pointer operator->() const; // C++03 +pointer operator->() const; // C++98 constexpr pointer operator->() const; // C++17 constexpr pointer operator->() const // C++20 requires (is_pointer_v || @@ -18,7 +18,7 @@ constexpr pointer operator->() const // C++20 ## 戻り値 -- C++03 : `&(operator*())` +- C++98 : `&(operator*())` - C++14 : [`addressof`](/reference/memory/addressof.md)`(operator*())` - C++20 : 次のいずれか - `Iterator`がポインタ型である場合 diff --git a/reference/iterator/reverse_iterator/op_assign.md b/reference/iterator/reverse_iterator/op_assign.md index fb4db494ad..dc00583993 100644 --- a/reference/iterator/reverse_iterator/op_assign.md +++ b/reference/iterator/reverse_iterator/op_assign.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator& operator=(const reverse_iterator& u) = default; // (1) C++03 +reverse_iterator& operator=(const reverse_iterator& u) = default; // (1) C++98 constexpr reverse_iterator& operator=(const reverse_iterator& u) = default; // (1) C++17 template -reverse_iterator& operator=(const reverse_iterator& u); // (2) C++03 +reverse_iterator& operator=(const reverse_iterator& u); // (2) C++98 template constexpr reverse_iterator& operator=(const reverse_iterator& u); // (2) C++17 ``` diff --git a/reference/iterator/reverse_iterator/op_at.md b/reference/iterator/reverse_iterator/op_at.md index b570a63d53..bd5d84df76 100644 --- a/reference/iterator/reverse_iterator/op_at.md +++ b/reference/iterator/reverse_iterator/op_at.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -unspecified operator[](difference_type n) const; // C++03 +unspecified operator[](difference_type n) const; // C++98 constexpr unspecified operator[](difference_type n) const; // C++17 ``` * unspecified[italic] diff --git a/reference/iterator/reverse_iterator/op_constructor.md b/reference/iterator/reverse_iterator/op_constructor.md index 35c326ceab..b4d797854f 100644 --- a/reference/iterator/reverse_iterator/op_constructor.md +++ b/reference/iterator/reverse_iterator/op_constructor.md @@ -5,14 +5,14 @@ * function[meta id-type] ```cpp -reverse_iterator(); // (1) C++03 +reverse_iterator(); // (1) C++98 constexpr reverse_iterator(); // (1) C++17 -explicit reverse_iterator(Iterator x); // (2) C++03 +explicit reverse_iterator(Iterator x); // (2) C++98 constexpr explicit reverse_iterator(Iterator x); // (2) C++17 template -reverse_iterator(const reverse_iterator& u); // (3) C++03 +reverse_iterator(const reverse_iterator& u); // (3) C++98 template constexpr reverse_iterator(const reverse_iterator& u); // (3) C++17 diff --git a/reference/iterator/reverse_iterator/op_decrement.md b/reference/iterator/reverse_iterator/op_decrement.md index fca02e0db4..94e897a5eb 100644 --- a/reference/iterator/reverse_iterator/op_decrement.md +++ b/reference/iterator/reverse_iterator/op_decrement.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -reverse_iterator& operator--(); // (1) C++03 +reverse_iterator& operator--(); // (1) C++98 constexpr reverse_iterator& operator--(); // (1) C++17 -reverse_iterator operator--(int); // (2) C++03 +reverse_iterator operator--(int); // (2) C++98 constexpr reverse_iterator operator--(int); // (2) C++17 ``` diff --git a/reference/iterator/reverse_iterator/op_deref.md b/reference/iterator/reverse_iterator/op_deref.md index 60075bbda0..8737e8f3c2 100644 --- a/reference/iterator/reverse_iterator/op_deref.md +++ b/reference/iterator/reverse_iterator/op_deref.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -reference operator*() const; // C++03 +reference operator*() const; // C++98 constexpr reference operator*() const; // C++17 ``` diff --git a/reference/iterator/reverse_iterator/op_equal.md b/reference/iterator/reverse_iterator/op_equal.md index 031c5d97e0..e605cd7d9c 100644 --- a/reference/iterator/reverse_iterator/op_equal.md +++ b/reference/iterator/reverse_iterator/op_equal.md @@ -7,7 +7,7 @@ namespace std { template bool operator==(const reverse_iterator& x, - const reverse_iterator& y); // C++03 + const reverse_iterator& y); // C++98 template constexpr bool operator==(const reverse_iterator& x, diff --git a/reference/iterator/reverse_iterator/op_greater.md b/reference/iterator/reverse_iterator/op_greater.md index a749d5bca3..5c2407eb27 100644 --- a/reference/iterator/reverse_iterator/op_greater.md +++ b/reference/iterator/reverse_iterator/op_greater.md @@ -7,7 +7,7 @@ namespace std { template bool operator>(const reverse_iterator& x, - const reverse_iterator& y); // C++03 + const reverse_iterator& y); // C++98 template constexpr bool operator>(const reverse_iterator& x, diff --git a/reference/iterator/reverse_iterator/op_greater_equal.md b/reference/iterator/reverse_iterator/op_greater_equal.md index bc72cb3dd1..e6d8786759 100644 --- a/reference/iterator/reverse_iterator/op_greater_equal.md +++ b/reference/iterator/reverse_iterator/op_greater_equal.md @@ -7,7 +7,7 @@ namespace std { template bool operator>=(const reverse_iterator& x, - const reverse_iterator& y); // C++03 + const reverse_iterator& y); // C++98 template constexpr bool operator>=(const reverse_iterator& x, diff --git a/reference/iterator/reverse_iterator/op_increment.md b/reference/iterator/reverse_iterator/op_increment.md index 15957f0f76..87d59155da 100644 --- a/reference/iterator/reverse_iterator/op_increment.md +++ b/reference/iterator/reverse_iterator/op_increment.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -reverse_iterator& operator++(); // (1) C++03 +reverse_iterator& operator++(); // (1) C++98 constexpr reverse_iterator& operator++(); // (1) C++17 -reverse_iterator operator++(int); // (2) C++03 +reverse_iterator operator++(int); // (2) C++98 constexpr reverse_iterator operator++(int); // (2) C++17 ``` diff --git a/reference/iterator/reverse_iterator/op_less.md b/reference/iterator/reverse_iterator/op_less.md index 856c39151a..68a9931025 100644 --- a/reference/iterator/reverse_iterator/op_less.md +++ b/reference/iterator/reverse_iterator/op_less.md @@ -7,7 +7,7 @@ namespace std { template bool operator<(const reverse_iterator& x, - const reverse_iterator& y); // C++03 + const reverse_iterator& y); // C++98 template constexpr bool operator<(const reverse_iterator& x, diff --git a/reference/iterator/reverse_iterator/op_less_equal.md b/reference/iterator/reverse_iterator/op_less_equal.md index 346f1f1f22..6b78277a39 100644 --- a/reference/iterator/reverse_iterator/op_less_equal.md +++ b/reference/iterator/reverse_iterator/op_less_equal.md @@ -7,7 +7,7 @@ namespace std { template bool operator<=(const reverse_iterator& x, - const reverse_iterator& y); // C++03 + const reverse_iterator& y); // C++98 template constexpr bool operator<=(const reverse_iterator& x, diff --git a/reference/iterator/reverse_iterator/op_minus.md b/reference/iterator/reverse_iterator/op_minus.md index 59cd9678ad..03addd5983 100644 --- a/reference/iterator/reverse_iterator/op_minus.md +++ b/reference/iterator/reverse_iterator/op_minus.md @@ -8,7 +8,7 @@ namespace std { template typename reverse_iterator::difference_type operator-(const reverse_iterator& x, - const reverse_iterator& y); // C++03 + const reverse_iterator& y); // C++98 template auto operator-(const reverse_iterator& x, diff --git a/reference/iterator/reverse_iterator/op_minus_assign.md b/reference/iterator/reverse_iterator/op_minus_assign.md index a66bfa584e..ba38d56264 100644 --- a/reference/iterator/reverse_iterator/op_minus_assign.md +++ b/reference/iterator/reverse_iterator/op_minus_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -reverse_iterator& operator-=(difference_type n); // C++03 +reverse_iterator& operator-=(difference_type n); // C++98 constexpr reverse_iterator& operator-=(difference_type n); // C++17 ``` diff --git a/reference/iterator/reverse_iterator/op_not_equal.md b/reference/iterator/reverse_iterator/op_not_equal.md index 4285e7f8d4..8f0e851e6f 100644 --- a/reference/iterator/reverse_iterator/op_not_equal.md +++ b/reference/iterator/reverse_iterator/op_not_equal.md @@ -7,7 +7,7 @@ namespace std { template bool operator!=(const reverse_iterator& x, - const reverse_iterator& y); // C++03 + const reverse_iterator& y); // C++98 template constexpr bool operator!=(const reverse_iterator& x, diff --git a/reference/iterator/reverse_iterator/op_plus.md b/reference/iterator/reverse_iterator/op_plus.md index f8d03707d6..d024e5d596 100644 --- a/reference/iterator/reverse_iterator/op_plus.md +++ b/reference/iterator/reverse_iterator/op_plus.md @@ -8,7 +8,7 @@ namespace std { template reverse_iterator operator+( typename reverse_iterator::difference_type n, - const reverse_iterator& x); // C++03 + const reverse_iterator& x); // C++98 template constexpr reverse_iterator operator+( diff --git a/reference/iterator/reverse_iterator/op_plus_assign.md b/reference/iterator/reverse_iterator/op_plus_assign.md index 0294d08c05..0e38bbabd9 100644 --- a/reference/iterator/reverse_iterator/op_plus_assign.md +++ b/reference/iterator/reverse_iterator/op_plus_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -reverse_iterator& operator+=(difference_type n); // C++03 +reverse_iterator& operator+=(difference_type n); // C++98 constexpr reverse_iterator& operator+=(difference_type n); // C++17 ``` diff --git a/reference/iterator/reverse_iterator/op_unary_minus.md b/reference/iterator/reverse_iterator/op_unary_minus.md index e187201bc3..7c340c9c89 100644 --- a/reference/iterator/reverse_iterator/op_unary_minus.md +++ b/reference/iterator/reverse_iterator/op_unary_minus.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -reverse_iterator operator-(difference_type n) const; // C++03 +reverse_iterator operator-(difference_type n) const; // C++98 constexpr reverse_iterator operator-(difference_type n) const; // C++17 ``` diff --git a/reference/iterator/reverse_iterator/op_unary_plus.md b/reference/iterator/reverse_iterator/op_unary_plus.md index b06aae3402..a83d85977e 100644 --- a/reference/iterator/reverse_iterator/op_unary_plus.md +++ b/reference/iterator/reverse_iterator/op_unary_plus.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -reverse_iterator operator+(difference_type n) const; // C++03 +reverse_iterator operator+(difference_type n) const; // C++98 constexpr reverse_iterator operator+(difference_type n) const; // C++17 ``` diff --git a/reference/limits/numeric_limits/denorm_min.md b/reference/limits/numeric_limits/denorm_min.md index 9ac1aa9666..2d164b47af 100644 --- a/reference/limits/numeric_limits/denorm_min.md +++ b/reference/limits/numeric_limits/denorm_min.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static T denorm_min() throw(); // (1) C++03 +static T denorm_min() throw(); // (1) C++98 static constexpr T denorm_min() noexcept; // (1) C++11 ``` diff --git a/reference/limits/numeric_limits/digits.md b/reference/limits/numeric_limits/digits.md index 7534f53f85..50ec4bd7c3 100644 --- a/reference/limits/numeric_limits/digits.md +++ b/reference/limits/numeric_limits/digits.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -static const int digits; // C++03 +static const int digits; // C++98 static constexpr int digits; // C++11 ``` diff --git a/reference/limits/numeric_limits/digits10.md b/reference/limits/numeric_limits/digits10.md index 247ee63586..12709ddfde 100644 --- a/reference/limits/numeric_limits/digits10.md +++ b/reference/limits/numeric_limits/digits10.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -static const int digits10; // (1) C++03 +static const int digits10; // (1) C++98 static constexpr int digits10; // (1) C++11 ``` diff --git a/reference/limits/numeric_limits/epsilon.md b/reference/limits/numeric_limits/epsilon.md index 9f6f61087f..cb7b895e56 100644 --- a/reference/limits/numeric_limits/epsilon.md +++ b/reference/limits/numeric_limits/epsilon.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -// C++03 +// C++98 static const T epsilon() throw(); // C++11 diff --git a/reference/limits/numeric_limits/has_denorm.md b/reference/limits/numeric_limits/has_denorm.md index 7eafd921ec..5fb2e6c2c7 100644 --- a/reference/limits/numeric_limits/has_denorm.md +++ b/reference/limits/numeric_limits/has_denorm.md @@ -6,7 +6,7 @@ * cpp23deprecated[meta cpp] ```cpp -static const float_denorm_style has_denorm; // (1) C++03 +static const float_denorm_style has_denorm; // (1) C++98 static constexpr float_denorm_style has_denorm; // (1) C++11 ``` * float_denorm_style[link /reference/limits/float_denorm_style.md] diff --git a/reference/limits/numeric_limits/has_denorm_loss.md b/reference/limits/numeric_limits/has_denorm_loss.md index 8726aa17cc..61cd6dba15 100644 --- a/reference/limits/numeric_limits/has_denorm_loss.md +++ b/reference/limits/numeric_limits/has_denorm_loss.md @@ -6,7 +6,7 @@ * cpp23deprecated[meta cpp] ```cpp -static const bool has_denorm_loss; // (1) C++03 +static const bool has_denorm_loss; // (1) C++98 static constexpr bool has_denorm_loss; // (1) C++11 ``` diff --git a/reference/limits/numeric_limits/has_infinity.md b/reference/limits/numeric_limits/has_infinity.md index 832c7d13ce..bf96100770 100644 --- a/reference/limits/numeric_limits/has_infinity.md +++ b/reference/limits/numeric_limits/has_infinity.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const bool has_infinity; // C++11 diff --git a/reference/limits/numeric_limits/has_quiet_nan.md b/reference/limits/numeric_limits/has_quiet_nan.md index b61c89efe6..823481a73b 100644 --- a/reference/limits/numeric_limits/has_quiet_nan.md +++ b/reference/limits/numeric_limits/has_quiet_nan.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const bool has_quiet_NaN; // C++11 diff --git a/reference/limits/numeric_limits/has_signaling_nan.md b/reference/limits/numeric_limits/has_signaling_nan.md index c4e99489eb..a8e18327f1 100644 --- a/reference/limits/numeric_limits/has_signaling_nan.md +++ b/reference/limits/numeric_limits/has_signaling_nan.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const bool has_signaling_NaN; // C++11 diff --git a/reference/limits/numeric_limits/infinity.md b/reference/limits/numeric_limits/infinity.md index 8694cf0029..1f2d73eb27 100644 --- a/reference/limits/numeric_limits/infinity.md +++ b/reference/limits/numeric_limits/infinity.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -// C++03 +// C++98 static T infinity() throw(); // C++11 diff --git a/reference/limits/numeric_limits/is_bounded.md b/reference/limits/numeric_limits/is_bounded.md index 627b1db7b0..a40f65f758 100644 --- a/reference/limits/numeric_limits/is_bounded.md +++ b/reference/limits/numeric_limits/is_bounded.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const bool is_bounded; // C++11 diff --git a/reference/limits/numeric_limits/is_exact.md b/reference/limits/numeric_limits/is_exact.md index f475d8a274..5e16c5482a 100644 --- a/reference/limits/numeric_limits/is_exact.md +++ b/reference/limits/numeric_limits/is_exact.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const bool is_exact; // C++11 diff --git a/reference/limits/numeric_limits/is_iec559.md b/reference/limits/numeric_limits/is_iec559.md index 2ae8514c41..0b92206b54 100644 --- a/reference/limits/numeric_limits/is_iec559.md +++ b/reference/limits/numeric_limits/is_iec559.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -static const bool is_iec559; // (1) C++03 +static const bool is_iec559; // (1) C++98 static constexpr bool is_iec559; // (1) C++11 ``` diff --git a/reference/limits/numeric_limits/is_integer.md b/reference/limits/numeric_limits/is_integer.md index a1059f19db..7527dad57f 100644 --- a/reference/limits/numeric_limits/is_integer.md +++ b/reference/limits/numeric_limits/is_integer.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const bool is_integer; // C++11 diff --git a/reference/limits/numeric_limits/is_modulo.md b/reference/limits/numeric_limits/is_modulo.md index 2a05dd363f..c5e683abdf 100644 --- a/reference/limits/numeric_limits/is_modulo.md +++ b/reference/limits/numeric_limits/is_modulo.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const bool is_modulo; // C++11 @@ -19,12 +19,12 @@ static constexpr bool is_modulo; 符号なし整数型の場合は常に`true`となる。 -- C++03 : 多くのマシンでは、浮動小数点数型の場合は`false`に、符号付き整数型の場合は`true`になる +- C++98 : 多くのマシンでは、浮動小数点数型の場合は`false`に、符号付き整数型の場合は`true`になる - C++17 : 標準では符号付き整数型は`false`となる。標準の拡張として実装の符号あり整数型が、未定義動作としてではなく正しくオーバーフローする場合、`true`と定義される ## 備考 -- C++03の「ほとんどのマシンでは符号付き整数型は`true`になる」という仕様は、符号あり整数型の未定義動作としてのオーバーフロー動作を正しいものとして扱ってしまっていた。これは間違いであった。C++17では、符号あり整数型は標準では`false`とし、実装がオーバーフロー時に値を折り返す場合に`true`と定義されるように修正された +- C++98の「ほとんどのマシンでは符号付き整数型は`true`になる」という仕様は、符号あり整数型の未定義動作としてのオーバーフロー動作を正しいものとして扱ってしまっていた。これは間違いであった。C++17では、符号あり整数型は標準では`false`とし、実装がオーバーフロー時に値を折り返す場合に`true`と定義されるように修正された - コンパイルオプション - GCCとClangでは、`-fwrapv`オプションをつけることで、符号付き整数型を2の補数表現として折り返すよう動作を規定するが、`is_modulo`は`false`となる - Visual C++では、`d2UndefIntOverflow`オプションをつけることで、符号付き整数型のオーバーフローを利用するコードの最適化を無効化し、値を折り返す動作になるが、`is_modulo`は`false`となる diff --git a/reference/limits/numeric_limits/is_signed.md b/reference/limits/numeric_limits/is_signed.md index fe90303603..3b496c266c 100644 --- a/reference/limits/numeric_limits/is_signed.md +++ b/reference/limits/numeric_limits/is_signed.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const bool is_signed; // C++11 diff --git a/reference/limits/numeric_limits/max.md b/reference/limits/numeric_limits/max.md index cbf052b84b..428008c292 100644 --- a/reference/limits/numeric_limits/max.md +++ b/reference/limits/numeric_limits/max.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static T max() throw(); // C++03 +static T max() throw(); // C++98 static constexpr T max() noexcept; // C++11 ``` @@ -24,7 +24,7 @@ static constexpr T max() noexcept; // C++11 ## 備考 `is_specialized == false`の場合は`T()`が返される。 -C++03バージョンは`constexpr`ではないため、非定数式となる。 +C++98バージョンは`constexpr`ではないため、非定数式となる。 対応するマクロを次の表に挙げる。 diff --git a/reference/limits/numeric_limits/max_exponent.md b/reference/limits/numeric_limits/max_exponent.md index 8a26bc891d..2953b3bf16 100644 --- a/reference/limits/numeric_limits/max_exponent.md +++ b/reference/limits/numeric_limits/max_exponent.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const int max_exponent; // C++11 diff --git a/reference/limits/numeric_limits/max_exponent10.md b/reference/limits/numeric_limits/max_exponent10.md index 9f87cb9a2d..80dd4321e7 100644 --- a/reference/limits/numeric_limits/max_exponent10.md +++ b/reference/limits/numeric_limits/max_exponent10.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const int max_exponent10; // C++11 diff --git a/reference/limits/numeric_limits/min.md b/reference/limits/numeric_limits/min.md index 8a9ebcd3d5..d45f4fb3ad 100644 --- a/reference/limits/numeric_limits/min.md +++ b/reference/limits/numeric_limits/min.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static T min() throw(); // C++03 +static T min() throw(); // C++98 static constexpr T min() noexcept; // C++11 ``` diff --git a/reference/limits/numeric_limits/min_exponent.md b/reference/limits/numeric_limits/min_exponent.md index 02195662e5..d1b7d348e3 100644 --- a/reference/limits/numeric_limits/min_exponent.md +++ b/reference/limits/numeric_limits/min_exponent.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const int min_exponent; // C++11 diff --git a/reference/limits/numeric_limits/min_exponent10.md b/reference/limits/numeric_limits/min_exponent10.md index fbfecead34..4eaeea7ef7 100644 --- a/reference/limits/numeric_limits/min_exponent10.md +++ b/reference/limits/numeric_limits/min_exponent10.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const int min_exponent10; // C++11 diff --git a/reference/limits/numeric_limits/quiet_nan.md b/reference/limits/numeric_limits/quiet_nan.md index 8bafd91575..b28d81fd0c 100644 --- a/reference/limits/numeric_limits/quiet_nan.md +++ b/reference/limits/numeric_limits/quiet_nan.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -// C++03 +// C++98 static T quiet_NaN() throw(); // C++11 diff --git a/reference/limits/numeric_limits/radix.md b/reference/limits/numeric_limits/radix.md index 6a9cd5474e..fb2b049fcc 100644 --- a/reference/limits/numeric_limits/radix.md +++ b/reference/limits/numeric_limits/radix.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const int radix; // C++11 diff --git a/reference/limits/numeric_limits/round_error.md b/reference/limits/numeric_limits/round_error.md index 7b4d08f67b..4925a4eb8e 100644 --- a/reference/limits/numeric_limits/round_error.md +++ b/reference/limits/numeric_limits/round_error.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -// C++03 +// C++98 static const T round_error() throw(); // C++11 diff --git a/reference/limits/numeric_limits/round_style.md b/reference/limits/numeric_limits/round_style.md index 20085bafea..eae4ccca58 100644 --- a/reference/limits/numeric_limits/round_style.md +++ b/reference/limits/numeric_limits/round_style.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const float_round_style round_style; // C++11 diff --git a/reference/limits/numeric_limits/signaling_nan.md b/reference/limits/numeric_limits/signaling_nan.md index a5ca6e55b8..249ba476bc 100644 --- a/reference/limits/numeric_limits/signaling_nan.md +++ b/reference/limits/numeric_limits/signaling_nan.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -// C++03 +// C++98 static const T signaling_NaN() throw(); // C++11 diff --git a/reference/limits/numeric_limits/tinyness_before.md b/reference/limits/numeric_limits/tinyness_before.md index 6ed3f302e6..b959393898 100644 --- a/reference/limits/numeric_limits/tinyness_before.md +++ b/reference/limits/numeric_limits/tinyness_before.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const bool tinyness_before; // C++11 diff --git a/reference/limits/numeric_limits/traps.md b/reference/limits/numeric_limits/traps.md index 75f8240569..62449da603 100644 --- a/reference/limits/numeric_limits/traps.md +++ b/reference/limits/numeric_limits/traps.md @@ -5,7 +5,7 @@ * variable[meta id-type] ```cpp -// C++03 +// C++98 static const bool traps; // C++11 diff --git a/reference/list/list/assign.md b/reference/list/list/assign.md index 81f419f006..a3a96d51a0 100644 --- a/reference/list/list/assign.md +++ b/reference/list/list/assign.md @@ -6,11 +6,11 @@ ```cpp template -void assign(InputIterator first, InputIterator last); // (1) C++03 +void assign(InputIterator first, InputIterator last); // (1) C++98 template constexpr void assign(InputIterator first, InputIterator last); // (1) C++26 -void assign(size_type n, const T& t); // (2) C++03 +void assign(size_type n, const T& t); // (2) C++98 constexpr void assign(size_type n, const T& t); // (2) C++26 void assign(initializer_list init); // (3) C++11 diff --git a/reference/list/list/back.md b/reference/list/list/back.md index 2068b94027..97e39b510d 100644 --- a/reference/list/list/back.md +++ b/reference/list/list/back.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -reference back(); // (1) C++03 +reference back(); // (1) C++98 constexpr reference back(); // (1) C++26 -const_reference back() const; // (2) C++03 +const_reference back() const; // (2) C++98 constexpr const_reference back() const; // (2) C++26 ``` diff --git a/reference/list/list/begin.md b/reference/list/list/begin.md index 022771b4f7..f8c07009e4 100644 --- a/reference/list/list/begin.md +++ b/reference/list/list/begin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator begin(); // (1) C++03 +iterator begin(); // (1) C++98 iterator begin() noexcept; // (1) C++11 constexpr iterator begin() noexcept; // (1) C++26 -const_iterator begin() const; // (2) C++03 +const_iterator begin() const; // (2) C++98 const_iterator begin() const noexcept; // (2) C++11 constexpr const_iterator begin() const noexcept; // (2) C++26 ``` diff --git a/reference/list/list/clear.md b/reference/list/list/clear.md index e22b3d5624..9df4cb3847 100644 --- a/reference/list/list/clear.md +++ b/reference/list/list/clear.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void clear(); // (1) C++03 +void clear(); // (1) C++98 void clear() noexcept; // (1) C++11 constexpr void clear() noexcept; // (1) C++26 ``` @@ -70,5 +70,5 @@ int main() ## 参照 - [LWG Issue 2231. DR 704 removes complexity guarantee for `clear()`](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2231) - - C++03までこの関数の効果は`erase(begin(), end())`だったため、それによって線形時間の計算量が保証されていたが、C++11で効果の表記が変わったために、保証がなくなってしまっていた。C++14であらためて保証を追加。 + - C++98までこの関数の効果は`erase(begin(), end())`だったため、それによって線形時間の計算量が保証されていたが、C++11で効果の表記が変わったために、保証がなくなってしまっていた。C++14であらためて保証を追加。 - [P3372R3 constexpr containers and adaptors](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3372r3.html) diff --git a/reference/list/list/empty.md b/reference/list/list/empty.md index ee888bf304..9d8d3393c4 100644 --- a/reference/list/list/empty.md +++ b/reference/list/list/empty.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool empty() const; // (1) C++03 +bool empty() const; // (1) C++98 bool empty() const noexcept; // (1) C++11 [[nodiscard]] bool empty() const noexcept; // (1) C++20 constexpr bool empty() const noexcept; // (1) C++26 diff --git a/reference/list/list/end.md b/reference/list/list/end.md index ffb098f0a1..7479170615 100644 --- a/reference/list/list/end.md +++ b/reference/list/list/end.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator end(); // (1) C++03 +iterator end(); // (1) C++98 iterator end() noexcept; // (1) C++11 constexpr iterator end() noexcept; // (1) C++26 -const_iterator end() const; // (2) C++03 +const_iterator end() const; // (2) C++98 const_iterator end() const noexcept; // (2) C++11 constexpr const_iterator end() const noexcept; // (2) C++26 ``` diff --git a/reference/list/list/erase.md b/reference/list/list/erase.md index 445db738c8..25a93eb20c 100644 --- a/reference/list/list/erase.md +++ b/reference/list/list/erase.md @@ -5,13 +5,13 @@ * function[meta id-type] ```cpp -iterator erase(iterator position); // (1) C++03 +iterator erase(iterator position); // (1) C++98 iterator erase(const_iterator position); // (1) C++11 constexpr iterator erase(const_iterator position); // (1) C++26 iterator erase(iterator position, - iterator last); // (2) C++03 + iterator last); // (2) C++98 iterator erase(const_iterator position, const_iterator last); // (2) C++11 diff --git a/reference/list/list/front.md b/reference/list/list/front.md index 3963c09036..576e9aed1d 100644 --- a/reference/list/list/front.md +++ b/reference/list/list/front.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -reference front(); // (1) C++03 +reference front(); // (1) C++98 constexpr reference front(); // (1) C++26 -const_reference front() const; // (2) C++03 +const_reference front() const; // (2) C++98 constexpr const_reference front() const; // (2) C++26 ``` diff --git a/reference/list/list/get_allocator.md b/reference/list/list/get_allocator.md index e935f27616..5059c5f1a9 100644 --- a/reference/list/list/get_allocator.md +++ b/reference/list/list/get_allocator.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -allocator_type get_allocator() const; // (1) C++03 +allocator_type get_allocator() const; // (1) C++98 allocator_type get_allocator() const noexcept; // (1) C++11 constexpr allocator_type get_allocator() const noexcept; // (1) C++26 ``` @@ -46,7 +46,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 ### 処理系 diff --git a/reference/list/list/insert.md b/reference/list/list/insert.md index 4033a5c46e..699a1098e5 100644 --- a/reference/list/list/insert.md +++ b/reference/list/list/insert.md @@ -7,7 +7,7 @@ ```cpp iterator insert(iterator position, - const T& x); // (1) C++03 + const T& x); // (1) C++98 iterator insert(const_iterator position, const T& x); // (1) C++11 @@ -25,7 +25,7 @@ constexpr iterator void insert(iterator position, size_type n, - const T& x); // (3) C++03 + const T& x); // (3) C++98 iterator insert(const_iterator position, size_type n, @@ -39,7 +39,7 @@ template void insert(iterator position, InputIterator first, - InputIterator last); // (4) C++03 + InputIterator last); // (4) C++98 template iterator insert(const_iterator position, @@ -78,7 +78,7 @@ constexpr iterator ## 戻り値 - (1), (2) : 挿入された要素を指すイテレータ - (3), (4) : - - C++03 : なし + - C++98 : なし - C++11 : 挿入された要素の先頭を指すイテレータ - (5) : 挿入された要素の先頭を指すイテレータ diff --git a/reference/list/list/max_size.md b/reference/list/list/max_size.md index a9d4de2392..174e2d0392 100644 --- a/reference/list/list/max_size.md +++ b/reference/list/list/max_size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type max_size() const; // (1) C++03 +size_type max_size() const; // (1) C++98 size_type max_size() const noexcept; // (1) C++11 constexpr size_type max_size() const noexcept; // (1) C++26 ``` diff --git a/reference/list/list/merge.md b/reference/list/list/merge.md index 04d8c13005..3fb9c25c57 100644 --- a/reference/list/list/merge.md +++ b/reference/list/list/merge.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void merge(list& x); // (1) C++03 +void merge(list& x); // (1) C++98 constexpr void merge(list& x); // (1) C++26 void merge(list&& x); // (2) C++11 @@ -13,7 +13,7 @@ constexpr void merge(list&& x); // (2) C++26 template void - merge(list& x, Compare comp); // (3) C++03 + merge(list& x, Compare comp); // (3) C++98 template constexpr void merge(list& x, Compare comp); // (3) C++26 diff --git a/reference/list/list/op_assign.md b/reference/list/list/op_assign.md index 734501fd5f..cd8d3ec153 100644 --- a/reference/list/list/op_assign.md +++ b/reference/list/list/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -list& operator=(const list& x); // (1) C++03 +list& operator=(const list& x); // (1) C++98 constexpr list& operator=(const list& x); // (1) C++26 list& operator=(list&& x); // (2) C++11 diff --git a/reference/list/list/op_constructor.md b/reference/list/list/op_constructor.md index 67652bd32f..ecbe0ef993 100644 --- a/reference/list/list/op_constructor.md +++ b/reference/list/list/op_constructor.md @@ -14,7 +14,7 @@ constexpr list(const Allocator& a); // (2) C++26 explicit list(const Allocator& a = Allocator()); // (1), (2) C++11 まで。C++14 で削除 explicit list(size_type n, const T& value = T(), - const Allocator& a = Allocator()); // (3) C++03 まで。C++11 で削除 + const Allocator& a = Allocator()); // (3) C++98 まで。C++11 で削除 list(size_type n, const T& value, const Allocator& a = Allocator()); // (3) C++11 から constexpr @@ -33,14 +33,14 @@ constexpr explicit template list(InputIterator first, InputIterator last, - const Allocator& a = Allocator()); // (5) C++03 + const Allocator& a = Allocator()); // (5) C++98 template constexpr list(InputIterator first, InputIterator last, const Allocator& a = Allocator()); // (5) C++26 -list(const list& x); // (6) C++03 +list(const list& x); // (6) C++98 constexpr list(const list& x); // (6) C++26 list(list&& x); // (7) C++11 @@ -111,7 +111,7 @@ list オブジェクトの構築 ## 備考 -- (5) の形式は、C++03 までは `InputIterator` が整数型の場合には `list(static_cast(first), static_cast(last), a)` と等価とされていたが、C++11 では `InputIterator` が入力イテレータの要件を満たさなければオーバーロード解決に参加しないように変更された。 +- (5) の形式は、C++98 までは `InputIterator` が整数型の場合には `list(static_cast(first), static_cast(last), a)` と等価とされていたが、C++11 では `InputIterator` が入力イテレータの要件を満たさなければオーバーロード解決に参加しないように変更された。 - C++11 では、(3) の形式の引数 `value` に関するデフォルト引数が削除され、新たに (4) の形式が追加された。 これは、デフォルト引数を使用すると、引数 `value` のデフォルト初期化 1 回+`list` の要素へのコピー初期化 `n` 回のコンストラクタ呼び出しが必要となるが、デフォルト引数でなければ `list` の要素へのデフォルト初期化 `n` 回のコンストラクタ呼び出しで済むためである。 diff --git a/reference/list/list/op_destructor.md b/reference/list/list/op_destructor.md index 5ffc43b481..9a19023c19 100644 --- a/reference/list/list/op_destructor.md +++ b/reference/list/list/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -~list(); // (1) C++03 +~list(); // (1) C++98 constexpr ~list(); // (1) C++26 ``` diff --git a/reference/list/list/op_equal.md b/reference/list/list/op_equal.md index bef3a9ec40..07860ba6a5 100644 --- a/reference/list/list/op_equal.md +++ b/reference/list/list/op_equal.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator==(const list& x, const list& y); // (1) C++03 + bool operator==(const list& x, const list& y); // (1) C++98 template constexpr bool operator==(const list& x, const list& y); // (1) C++26 } @@ -21,7 +21,7 @@ namespace std { ## 効果 -- C++03 : [`distance`](/reference/iterator/distance.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`()) ==` [`distance`](/reference/iterator/distance.md)`(y.`[`begin`](begin.md)`(), y.`[`end`](end.md)`()) &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` +- C++98 : [`distance`](/reference/iterator/distance.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`()) ==` [`distance`](/reference/iterator/distance.md)`(y.`[`begin`](begin.md)`(), y.`[`end`](end.md)`()) &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` - C++14 : [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`(), y.`[`end`](end.md)`());` diff --git a/reference/list/list/op_greater.md b/reference/list/list/op_greater.md index 1a9b76931a..3ffd439af7 100644 --- a/reference/list/list/op_greater.md +++ b/reference/list/list/op_greater.md @@ -8,7 +8,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template bool operator>(const list& x, - const list& y); // (1) C++03 + const list& y); // (1) C++98 template constexpr bool operator>(const list& x, const list& y); // (1) C++26 diff --git a/reference/list/list/op_greater_equal.md b/reference/list/list/op_greater_equal.md index f099e303fa..713d562df5 100644 --- a/reference/list/list/op_greater_equal.md +++ b/reference/list/list/op_greater_equal.md @@ -8,7 +8,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template bool operator>=(const list& x, - const list& y); // (1) C++03 + const list& y); // (1) C++98 template constexpr bool operator>=(const list& x, const list& y); // (1) C++26 diff --git a/reference/list/list/op_less.md b/reference/list/list/op_less.md index 12b085afeb..c534f31dfb 100644 --- a/reference/list/list/op_less.md +++ b/reference/list/list/op_less.md @@ -8,7 +8,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template bool operator<(const list& x, - const list& y); // (1) C++03 + const list& y); // (1) C++98 template constexpr bool operator<(const list& x, const list& y); // (1) C++26 diff --git a/reference/list/list/op_less_equal.md b/reference/list/list/op_less_equal.md index 739271ddd9..6a42f241a6 100644 --- a/reference/list/list/op_less_equal.md +++ b/reference/list/list/op_less_equal.md @@ -8,7 +8,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template bool operator<=(const list& x, - const list& y); // (1) C++03 + const list& y); // (1) C++98 template constexpr bool operator<=(const list& x, const list& y); // (1) C++26 diff --git a/reference/list/list/op_not_equal.md b/reference/list/list/op_not_equal.md index 9333a0d850..b8782cfac4 100644 --- a/reference/list/list/op_not_equal.md +++ b/reference/list/list/op_not_equal.md @@ -8,7 +8,7 @@ namespace std { // operator==により、以下の演算子が使用可能になる (C++20) template bool operator!=(const list& x, - const list& y); // (1) C++03 + const list& y); // (1) C++98 template constexpr bool operator!=(const list& x, const list& y); // (1) C++26 diff --git a/reference/list/list/pop_back.md b/reference/list/list/pop_back.md index 2f6ea7bc87..6a838bd6da 100644 --- a/reference/list/list/pop_back.md +++ b/reference/list/list/pop_back.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void pop_back(); // (1) C++03 +void pop_back(); // (1) C++98 constexpr void pop_back(); // (1) C++26 ``` diff --git a/reference/list/list/pop_front.md b/reference/list/list/pop_front.md index 4cda745b83..e209818769 100644 --- a/reference/list/list/pop_front.md +++ b/reference/list/list/pop_front.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void pop_front(); // (1) C++03 +void pop_front(); // (1) C++98 constexpr void pop_front(); // (1) C++26 ``` diff --git a/reference/list/list/push_back.md b/reference/list/list/push_back.md index cee39f98e8..0e6ff49254 100644 --- a/reference/list/list/push_back.md +++ b/reference/list/list/push_back.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void push_back(const T& x); // (1) C++03 +void push_back(const T& x); // (1) C++98 constexpr void push_back(const T& x); // (1) C++26 void push_back(T&& x); // (2) C++11 @@ -57,7 +57,7 @@ world ``` -### イテレート中に要素を追加する (C++03) +### イテレート中に要素を追加する (C++98) ```cpp example #include #include diff --git a/reference/list/list/push_front.md b/reference/list/list/push_front.md index 4db1b436b0..49113bd976 100644 --- a/reference/list/list/push_front.md +++ b/reference/list/list/push_front.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void push_front(const T& x); // (1) C++03 +void push_front(const T& x); // (1) C++98 constexpr void push_front(const T& x); // (1) C++26 void push_front(T&& x); // (2) C++11 diff --git a/reference/list/list/rbegin.md b/reference/list/list/rbegin.md index 1b1ec5d0e3..1ee77a6b72 100644 --- a/reference/list/list/rbegin.md +++ b/reference/list/list/rbegin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rbegin(); // (1) C++03 +reverse_iterator rbegin(); // (1) C++98 reverse_iterator rbegin() noexcept; // (1) C++11 constexpr reverse_iterator rbegin() noexcept; // (1) C++26 -const_reverse_iterator rbegin() const; // (2) C++03 +const_reverse_iterator rbegin() const; // (2) C++98 const_reverse_iterator rbegin() const noexcept; // (2) C++11 constexpr const_reverse_iterator rbegin() const noexcept; // (2) C++26 ``` diff --git a/reference/list/list/remove.md b/reference/list/list/remove.md index 93714d695e..a054d242c8 100644 --- a/reference/list/list/remove.md +++ b/reference/list/list/remove.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void remove(const T& value); // (1) C++03 +void remove(const T& value); // (1) C++98 size_type remove(const T& value); // (1) C++20 constexpr size_type remove(const T& value); // (1) C++26 ``` @@ -20,7 +20,7 @@ constexpr size_type remove(const T& value); // (1) C++26 ## 戻り値 -- C++03 : なし +- C++98 : なし - C++20 : 削除された要素数を返す diff --git a/reference/list/list/remove_if.md b/reference/list/list/remove_if.md index 3ac6558db3..8d1a77aaf5 100644 --- a/reference/list/list/remove_if.md +++ b/reference/list/list/remove_if.md @@ -6,7 +6,7 @@ ```cpp template -void remove_if(Predicate pred); // (1) C++03 +void remove_if(Predicate pred); // (1) C++98 template size_type remove_if(Predicate pred); // (1) C++20 template @@ -23,7 +23,7 @@ constexpr size_type remove_if(Predicate pred); // (1) C++26 ## 戻り値 -- C++03 : なし +- C++98 : なし - C++20 : 削除された要素数を返す diff --git a/reference/list/list/rend.md b/reference/list/list/rend.md index 977ddf7be6..fd703b1d49 100644 --- a/reference/list/list/rend.md +++ b/reference/list/list/rend.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rend(); // (1) C++03 +reverse_iterator rend(); // (1) C++98 reverse_iterator rend() noexcept; // (1) C++11 constexpr reverse_iterator rend() noexcept; // (1) C++26 -const_reverse_iterator rend() const; // (2) C++03 +const_reverse_iterator rend() const; // (2) C++98 const_reverse_iterator rend() const noexcept; // (2) C++11 constexpr const_reverse_iterator rend() const noexcept; // (2) C++26 ``` diff --git a/reference/list/list/resize.md b/reference/list/list/resize.md index 86ba5f2706..c951c03c6e 100644 --- a/reference/list/list/resize.md +++ b/reference/list/list/resize.md @@ -11,7 +11,7 @@ constexpr void resize(size_type sz); // (1) C++26 void resize(size_type sz, const value_type& c); // (2) C++11 constexpr void resize(size_type sz, const value_type& c); // (2) C++26 -void resize(size_type sz, T c = T()); // (1) + (2) C++03。C++11で削除 +void resize(size_type sz, T c = T()); // (1) + (2) C++98。C++11で削除 ``` ## 概要 diff --git a/reference/list/list/reverse.md b/reference/list/list/reverse.md index e11def9f7c..bdd8b97576 100644 --- a/reference/list/list/reverse.md +++ b/reference/list/list/reverse.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void reverse(); // (1) C++03 +void reverse(); // (1) C++98 void reverse() noexcept; // (1) C++11 constexpr void reverse() noexcept; // (1) C++26 ``` diff --git a/reference/list/list/size.md b/reference/list/list/size.md index b09739d55f..97dd7aa40e 100644 --- a/reference/list/list/size.md +++ b/reference/list/list/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type size() const; // (1) C++03 +size_type size() const; // (1) C++98 size_type size() const noexcept; // (1) C++11 constexpr size_type size() const noexcept; // (1) C++26 ``` @@ -23,7 +23,7 @@ constexpr size_type size() const noexcept; // (1) C++26 ## 計算量 -- C++03 : 実装依存(多くの実装で定数時間 or 線形時間) +- C++98 : 実装依存(多くの実装で定数時間 or 線形時間) - C++11 : 定数時間 diff --git a/reference/list/list/sort.md b/reference/list/list/sort.md index e3ec90deb9..97153bb2de 100644 --- a/reference/list/list/sort.md +++ b/reference/list/list/sort.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -void sort(); // (1) C++03 +void sort(); // (1) C++98 constexpr void sort(); // (1) C++26 template -void sort(Compare comp); // (2) C++03 +void sort(Compare comp); // (2) C++98 template constexpr void sort(Compare comp); // (2) C++26 ``` diff --git a/reference/list/list/splice.md b/reference/list/list/splice.md index f6ba6dd54a..8eddd99c51 100644 --- a/reference/list/list/splice.md +++ b/reference/list/list/splice.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void splice(iterator position, list& x); // (1) C++03 +void splice(iterator position, list& x); // (1) C++98 void splice(const_iterator position, list& x); // (1) C++11 constexpr void splice(const_iterator position, list& x); // (1) C++26 @@ -15,7 +15,7 @@ constexpr void splice(const_iterator position, list&& x); // (2) C++26 void splice(iterator position, list& x, - iterator i); // (3) C++03 + iterator i); // (3) C++98 void splice(const_iterator position, list& x, @@ -38,7 +38,7 @@ void splice(iterator position, list& x, iterator first, - iterator last); // (5) C++03 + iterator last); // (5) C++98 void splice(const_iterator position, list& x, @@ -74,7 +74,7 @@ constexpr void - 第1パラメータ`position`が、イテレータ範囲`[`[`begin()`](begin.md)`,` [`end()`](end.md)`)`の間接参照可能なイテレータであること。 - `i`, `first`, `last`が、`x`のイテレータであること。 - (1), (2) : - - C++03 : `&x != this`であること + - C++98 : `&x != this`であること - C++11 : [`addressof`](/reference/memory/addressof.md)`(x) != this`であること - (5), (6) : `position`が`[first, last)`に含まれる場合、未定義動作。 @@ -84,7 +84,7 @@ constexpr void ## 計算量 -- C++03まで +- C++98まで - (1) : `x`の要素数に対して線形時間 - (3) : 定数時間 - (5) : `[first, last)`の要素数に対して線形時間 @@ -99,9 +99,9 @@ constexpr void ## 備考 -- (1), (2) : C++03の場合、移動元の`list`オブジェクト`x`は、全てのイテレータと参照が無効になる。C++11以降は、無効にならない。 -- (3), (4) : C++03の場合、移動元の要素を指すイテレータ`i`は、そのイテレータおよび参照が無効になる。C++11以降は、無効にならない。 -- (5), (6) : C++03の場合、移動元のイテレータ範囲`[first, last)`は、その範囲のイテレータおよび参照が無効になる。C++11以降は、無効にならない。 +- (1), (2) : C++98の場合、移動元の`list`オブジェクト`x`は、全てのイテレータと参照が無効になる。C++11以降は、無効にならない。 +- (3), (4) : C++98の場合、移動元の要素を指すイテレータ`i`は、そのイテレータおよび参照が無効になる。C++11以降は、無効にならない。 +- (5), (6) : C++98の場合、移動元のイテレータ範囲`[first, last)`は、その範囲のイテレータおよび参照が無効になる。C++11以降は、無効にならない。 - 移動先と移動元のアロケータが等値でない場合(`get_allocator() != x.get_allocator()`の場合)、動作は未定義である。 diff --git a/reference/list/list/swap.md b/reference/list/list/swap.md index a034467fad..f8ccbda970 100644 --- a/reference/list/list/swap.md +++ b/reference/list/list/swap.md @@ -6,7 +6,7 @@ ```cpp void - swap(list& x); // (1) C++03 + swap(list& x); // (1) C++98 void swap(list& x) noexcept(allocator_traits::is_always_equal::value); // (1) C++17 diff --git a/reference/list/list/swap_free.md b/reference/list/list/swap_free.md index d149176ee1..18b3c1e745 100644 --- a/reference/list/list/swap_free.md +++ b/reference/list/list/swap_free.md @@ -8,7 +8,7 @@ namespace std { template void swap(list& x, - list& y); // (1) C++03 + list& y); // (1) C++98 template void swap(list& x, diff --git a/reference/list/list/unique.md b/reference/list/list/unique.md index 68dcc3460b..48fdca344d 100644 --- a/reference/list/list/unique.md +++ b/reference/list/list/unique.md @@ -5,12 +5,12 @@ * function[meta id-type] ```cpp -void unique(); // (1) C++03 +void unique(); // (1) C++98 size_type unique(); // (1) C++20 constexpr size_type unique(); // (1) C++26 template -void unique(BinaryPredicate pred); // (2) C++03 +void unique(BinaryPredicate pred); // (2) C++98 template size_type unique(BinaryPredicate pred); // (2) C++20 template @@ -41,7 +41,7 @@ constexpr size_type unique(BinaryPredicate pred); // (2) C++26 ## 戻り値 - (1), (2) : - - C++03 : なし + - C++98 : なし - C++20 : 削除された要素数を返す diff --git a/reference/locale/has_facet.md b/reference/locale/has_facet.md index d72fa64a5d..3624c8ae3b 100644 --- a/reference/locale/has_facet.md +++ b/reference/locale/has_facet.md @@ -43,7 +43,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/isalnum.md b/reference/locale/isalnum.md index 491637171d..171b6a5855 100644 --- a/reference/locale/isalnum.md +++ b/reference/locale/isalnum.md @@ -46,7 +46,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/isalpha.md b/reference/locale/isalpha.md index aafd36e36a..1cb60c90cb 100644 --- a/reference/locale/isalpha.md +++ b/reference/locale/isalpha.md @@ -46,7 +46,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/iscntrl.md b/reference/locale/iscntrl.md index 33bb5aa92e..efb7074453 100644 --- a/reference/locale/iscntrl.md +++ b/reference/locale/iscntrl.md @@ -46,7 +46,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/isdigit.md b/reference/locale/isdigit.md index c21470456a..33914813b5 100644 --- a/reference/locale/isdigit.md +++ b/reference/locale/isdigit.md @@ -46,7 +46,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/isgraph.md b/reference/locale/isgraph.md index 6580ca4026..a8efd1728f 100644 --- a/reference/locale/isgraph.md +++ b/reference/locale/isgraph.md @@ -46,7 +46,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/islower.md b/reference/locale/islower.md index 09f184bd86..4d911c82a6 100644 --- a/reference/locale/islower.md +++ b/reference/locale/islower.md @@ -46,7 +46,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/isprint.md b/reference/locale/isprint.md index 76e4c189a6..5a10875cb2 100644 --- a/reference/locale/isprint.md +++ b/reference/locale/isprint.md @@ -46,7 +46,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/ispunct.md b/reference/locale/ispunct.md index 21c6c62154..ad3ccfb7ec 100644 --- a/reference/locale/ispunct.md +++ b/reference/locale/ispunct.md @@ -46,7 +46,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/isspace.md b/reference/locale/isspace.md index 4e031251bd..5ee8c014d8 100644 --- a/reference/locale/isspace.md +++ b/reference/locale/isspace.md @@ -46,7 +46,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/isupper.md b/reference/locale/isupper.md index f95dc5fb97..57d23f551d 100644 --- a/reference/locale/isupper.md +++ b/reference/locale/isupper.md @@ -46,7 +46,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/isxdigit.md b/reference/locale/isxdigit.md index 6f10548dc0..bc78e6861a 100644 --- a/reference/locale/isxdigit.md +++ b/reference/locale/isxdigit.md @@ -46,7 +46,7 @@ true ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/locale/locale.md b/reference/locale/locale.md index 05067e7c4c..49370f7f08 100644 --- a/reference/locale/locale.md +++ b/reference/locale/locale.md @@ -179,7 +179,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/locale/locale/classic.md b/reference/locale/locale/classic.md index ee4ea0576d..439757040b 100644 --- a/reference/locale/locale/classic.md +++ b/reference/locale/locale/classic.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static const locale& classic(); // (1) C++03 +static const locale& classic(); // (1) C++98 ``` ## 概要 @@ -44,7 +44,7 @@ C ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/locale/locale/combine.md b/reference/locale/locale/combine.md index 57ca986c20..ecb82ca2ed 100644 --- a/reference/locale/locale/combine.md +++ b/reference/locale/locale/combine.md @@ -6,7 +6,7 @@ ```cpp template -locale combine(const locale& other) const; // (1) C++03 +locale combine(const locale& other) const; // (1) C++98 ``` ## 概要 @@ -56,7 +56,7 @@ false ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/locale/locale/global.md b/reference/locale/locale/global.md index 956fb47315..6766cf535a 100644 --- a/reference/locale/locale/global.md +++ b/reference/locale/locale/global.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static locale global(const locale& loc); // (1) C++03 +static locale global(const locale& loc); // (1) C++98 ``` ## 概要 @@ -49,7 +49,7 @@ C ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/locale/locale/name.md b/reference/locale/locale/name.md index 472b1e627f..c1d1d9a77a 100644 --- a/reference/locale/locale/name.md +++ b/reference/locale/locale/name.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -string name() const; // (1) C++03 +string name() const; // (1) C++98 ``` * string[link /reference/string/basic_string.md] @@ -46,7 +46,7 @@ C ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/locale/locale/op_assign.md b/reference/locale/locale/op_assign.md index ccddca2361..89b3dec79a 100644 --- a/reference/locale/locale/op_assign.md +++ b/reference/locale/locale/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -const locale& operator=(const locale& other) noexcept; // (1) C++03 +const locale& operator=(const locale& other) noexcept; // (1) C++98 ``` ## 概要 @@ -48,7 +48,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/locale/locale/op_call.md b/reference/locale/locale/op_call.md index bb316a21a0..9f19f88ed7 100644 --- a/reference/locale/locale/op_call.md +++ b/reference/locale/locale/op_call.md @@ -7,7 +7,7 @@ ```cpp template bool operator()(const basic_string& s1, - const basic_string& s2) const; // (1) C++03 + const basic_string& s2) const; // (1) C++98 ``` * basic_string[link /reference/string/basic_string.md] @@ -64,7 +64,7 @@ charlie ## バージョン ### 言語 -- C++03 +- C++98 ## 関連項目 diff --git a/reference/locale/locale/op_constructor.md b/reference/locale/locale/op_constructor.md index 73ab7c4f38..07e6c415c0 100644 --- a/reference/locale/locale/op_constructor.md +++ b/reference/locale/locale/op_constructor.md @@ -5,17 +5,17 @@ * function[meta id-type] ```cpp -locale() noexcept; // (1) C++03 -locale(const locale& other) noexcept; // (2) C++03 -explicit locale(const char* std_name); // (3) C++03 -explicit locale(const string& std_name); // (4) C++03 +locale() noexcept; // (1) C++98 +locale(const locale& other) noexcept; // (2) C++98 +explicit locale(const char* std_name); // (3) C++98 +explicit locale(const string& std_name); // (4) C++98 locale(const locale& other, - const char* std_name, category cats); // (5) C++03 + const char* std_name, category cats); // (5) C++98 locale(const locale& other, - const string& std_name, category cats); // (6) C++03 + const string& std_name, category cats); // (6) C++98 template -locale(const locale& other, Facet* f); // (7) C++03 -locale(const locale& other, const locale& one, category cats); // (8) C++03 +locale(const locale& other, Facet* f); // (7) C++98 +locale(const locale& other, const locale& one, category cats); // (8) C++98 ``` * string[link /reference/string/basic_string.md] diff --git a/reference/locale/locale/op_equal.md b/reference/locale/locale/op_equal.md index 3ab7bd4c5b..d266828ba0 100644 --- a/reference/locale/locale/op_equal.md +++ b/reference/locale/locale/op_equal.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool operator==(const locale& other) const; // (1) C++03 +bool operator==(const locale& other) const; // (1) C++98 ``` ## 概要 diff --git a/reference/locale/locale/op_not_equal.md b/reference/locale/locale/op_not_equal.md index 797c53a6a0..e894b07881 100644 --- a/reference/locale/locale/op_not_equal.md +++ b/reference/locale/locale/op_not_equal.md @@ -6,7 +6,7 @@ ```cpp // operator==により、以下のオーバーロードが使用可能になる (C++20) -bool operator!=(const locale& other) const; // (1) C++03 +bool operator!=(const locale& other) const; // (1) C++98 ``` ## 概要 diff --git a/reference/locale/tolower.md b/reference/locale/tolower.md index 5c415fcac4..3762cdbbf6 100644 --- a/reference/locale/tolower.md +++ b/reference/locale/tolower.md @@ -46,7 +46,7 @@ a ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/locale/toupper.md b/reference/locale/toupper.md index 0ce0389d44..0eb8613767 100644 --- a/reference/locale/toupper.md +++ b/reference/locale/toupper.md @@ -46,7 +46,7 @@ A ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 1.9 [mark verified], 2.9 [mark verified], 3.1 [mark verified] diff --git a/reference/locale/use_facet.md b/reference/locale/use_facet.md index 6088556139..2eac3f51cc 100644 --- a/reference/locale/use_facet.md +++ b/reference/locale/use_facet.md @@ -51,7 +51,7 @@ A ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 3.0 [mark verified] diff --git a/reference/map/map.md b/reference/map/map.md index bb61e0f660..474f9fe898 100644 --- a/reference/map/map.md +++ b/reference/map/map.md @@ -137,8 +137,8 @@ namespace std { | `const_iterator` | 読み取り専用双方向イテレータ。 | | | `size_type` | 要素数を表す符号なし整数型。`difference_type` で表現可能な非負整数(0以上の整数)を表すことが可能。(通常は [`size_t`](/reference/cstddef/size_t.md)) | | | `difference_type` | 同一のコンテナを指す `iterator` の差を表す符号付き整数型(通常は [`ptrdiff_t`](/reference/cstddef/ptrdiff_t.md))
`std::`[`iterator_traits`](/reference/iterator/iterator_traits.md)`::difference_type`、および、`std::`[`iterator_traits`](/reference/iterator/iterator_traits.md)`::difference_type` と同じ。 | | -| `pointer` | 要素 `value_type`へのポインタ。
C++03 : `typename Allocator::pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::pointer`。 | | -| `const_pointer` | 要素 `value_type`への`const`ポインタ。
C++03 : `typename Allocator::const_pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::const_pointer`。 | | +| `pointer` | 要素 `value_type`へのポインタ。
C++98 : `typename Allocator::pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::pointer`。 | | +| `const_pointer` | 要素 `value_type`への`const`ポインタ。
C++98 : `typename Allocator::const_pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::const_pointer`。 | | | `reverse_iterator` | 逆順双方向イテレータ。`std::`[`reverse_iterator`](/reference/iterator/reverse_iterator.md)``。 | | | `const_reverse_iterator` | 読み取り専用逆順双方向イテレータ。`std::`[`reverse_iterator`](/reference/iterator/reverse_iterator.md)``。 | | | `node_type` | [`node_handle`](/reference/node_handle/node_handle.md)クラステンプレートの特殊化。 | C++17 | diff --git a/reference/map/map/begin.md b/reference/map/map/begin.md index e688d605b7..ffcab63980 100644 --- a/reference/map/map/begin.md +++ b/reference/map/map/begin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator begin(); // (1) C++03 +iterator begin(); // (1) C++98 iterator begin() noexcept; // (1) C++11 constexpr iterator begin() noexcept; // (1) C++26 -const_iterator begin() const; // (2) C++03 +const_iterator begin() const; // (2) C++98 const_iterator begin() const noexcept; // (2) C++11 constexpr const_iterator begin() const noexcept; // (2) C++26 ``` @@ -70,7 +70,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 2.9 [mark verified], 3.0 [mark verified], 3.1 [mark verified], 3.2 [mark verified], 3.3 [mark verified] diff --git a/reference/map/map/clear.md b/reference/map/map/clear.md index 98287e93cf..34b08219d0 100644 --- a/reference/map/map/clear.md +++ b/reference/map/map/clear.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void clear(); // (1) C++03 +void clear(); // (1) C++98 void clear() noexcept; // (1) C++11 constexpr void clear() noexcept; // (1) C++26 ``` @@ -54,7 +54,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): ?? diff --git a/reference/map/map/count.md b/reference/map/map/count.md index b004e6c998..684dbee8e2 100644 --- a/reference/map/map/count.md +++ b/reference/map/map/count.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type count(const key_type& x) const; // (1) C++03 +size_type count(const key_type& x) const; // (1) C++98 constexpr size_type count(const key_type& x) const; // (1) C++26 template diff --git a/reference/map/map/empty.md b/reference/map/map/empty.md index e3495d175a..90bfbd5090 100644 --- a/reference/map/map/empty.md +++ b/reference/map/map/empty.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool empty() const; // (1) C++03 +bool empty() const; // (1) C++98 bool empty() const noexcept; // (1) C++11 [[nodiscard]] bool empty() const noexcept; // (1) C++20 constexpr bool empty() const noexcept; // (1) C++26 diff --git a/reference/map/map/end.md b/reference/map/map/end.md index 102cb617b3..3d516d6b7d 100644 --- a/reference/map/map/end.md +++ b/reference/map/map/end.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator end(); // (1) C++03 +iterator end(); // (1) C++98 iterator end() noexcept; // (1) C++11 constexpr iterator end() noexcept; // (1) C++26 -const_iterator end() const; // (2) C++03 +const_iterator end() const; // (2) C++98 const_iterator end() const noexcept; // (2) C++11 constexpr const_iterator end() const noexcept; // (2) C++26 ``` @@ -72,7 +72,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 2.9 [mark verified], 3.0 [mark verified], 3.1 [mark verified], 3.2 [mark verified], 3.3 [mark verified] diff --git a/reference/map/map/equal_range.md b/reference/map/map/equal_range.md index 7811c5fc2f..4d2a5aaba0 100644 --- a/reference/map/map/equal_range.md +++ b/reference/map/map/equal_range.md @@ -6,7 +6,7 @@ ```cpp pair - equal_range(const key_type& x); // (1) C++03 + equal_range(const key_type& x); // (1) C++98 constexpr pair equal_range(const key_type& x); // (1) C++26 @@ -18,7 +18,7 @@ constexpr pair equal_range(const K& x); // (2) C++26 pair - equal_range(const key_type& x) const; // (3) C++03 + equal_range(const key_type& x) const; // (3) C++98 constexpr pair equal_range(const key_type& x) const; // (3) C++26 diff --git a/reference/map/map/erase.md b/reference/map/map/erase.md index 3fe29bf14b..aad697aa67 100644 --- a/reference/map/map/erase.md +++ b/reference/map/map/erase.md @@ -5,14 +5,14 @@ * function[meta id-type] ```cpp -void erase(iterator position); // (1) C++03 (C++11で一旦削除) +void erase(iterator position); // (1) C++98 (C++11で一旦削除) iterator erase(iterator position); // (1) C++17 constexpr iterator erase(iterator position); // (1) C++26 iterator erase(const_iterator position); // (2) C++11 constexpr iterator erase(const_iterator position); // (2) C++26 -size_type erase(const key_type& x); // (3) C++03 +size_type erase(const key_type& x); // (3) C++98 constexpr size_type erase(const key_type& x); // (3) C++26 template @@ -20,7 +20,7 @@ size_type erase(K&& x); // (4) C++23 template constexpr size_type erase(K&& x); // (4) C++26 -void erase(iterator first, iterator last); // (5) C++03 +void erase(iterator first, iterator last); // (5) C++98 iterator erase(const_iterator first, const_iterator last); // (5) C++11 constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++26 ``` @@ -45,12 +45,12 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 ## 戻り値 - (1) : - - C++03 : 戻り値なし + - C++98 : 戻り値なし - C++17 : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) - (2) : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) - (3), (4) : 削除された要素の数を返す - (5) : - - C++03 : 戻り値なし + - C++98 : 戻り値なし - C++11 : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) @@ -64,7 +64,7 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 - (1) : C++17で再追加されたこのオーバーロードは、それ以前の言語バージョンから使用できる可能性がある - (1), (2) : この関数に、範囲外のイテレータ (終端イテレータを含む) を指定した場合の動作は未定義 - 削除された要素を指すイテレータ、および、参照のみ無効になる。なお、規格書に明確な記載は無いが、削除された要素を指すポインタも無効になる -- ループ中で `map` の要素を削除するためには、C++03 までは以下のようなコードを書く必要があった。 +- ループ中で `map` の要素を削除するためには、C++98 までは以下のようなコードを書く必要があった。 ```cpp while (it != map_object.end()) { if (条件) { @@ -89,7 +89,7 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 ## 例 -### 基本的な使い方 (C++03) +### 基本的な使い方 (C++98) ```cpp example #include #include @@ -144,7 +144,7 @@ int main() // 条件一致した要素を削除する if (it->first == 1) { // 削除された要素の次を指すイテレータが返される。 - // C++03では、erase()の戻り値を使用せず、 m.erase(it++); のように書く + // C++98では、erase()の戻り値を使用せず、 m.erase(it++); のように書く it = m.erase(it); } // 要素削除をしない場合に、イテレータを進める diff --git a/reference/map/map/find.md b/reference/map/map/find.md index ca15ecfffb..23a4061b86 100644 --- a/reference/map/map/find.md +++ b/reference/map/map/find.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator find(const key_type& x); // (1) C++03 +iterator find(const key_type& x); // (1) C++98 constexpr iterator find(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator find(const K& x); // (2) C++14 template constexpr iterator find(const K& x); // (2) C++26 -const_iterator find(const key_type& x) const; // (3) C++03 +const_iterator find(const key_type& x) const; // (3) C++98 constexpr const_iterator find(const key_type& x) const; // (3) C++26 template diff --git a/reference/map/map/get_allocator.md b/reference/map/map/get_allocator.md index 0bca151297..5a6bbe0347 100644 --- a/reference/map/map/get_allocator.md +++ b/reference/map/map/get_allocator.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -allocator_type get_allocator() const; // (1) C++03 +allocator_type get_allocator() const; // (1) C++98 allocator_type get_allocator() const noexcept; // (1) C++11 constexpr allocator_type get_allocator() const noexcept; // (1) C++26 ``` @@ -62,7 +62,7 @@ b ## バージョン ### 言語 -- C++03 +- C++98 - C++11 ### 処理系 diff --git a/reference/map/map/insert.md b/reference/map/map/insert.md index 18926db061..0b0bd32c4f 100644 --- a/reference/map/map/insert.md +++ b/reference/map/map/insert.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -pair insert(const value_type& x); // (1) C++03 +pair insert(const value_type& x); // (1) C++98 constexpr pair insert(const value_type& x); // (1) C++26 template @@ -16,7 +16,7 @@ constexpr pair insert(P&& x); // (2) C++26 pair insert(value_type&& x); // (3) C++17 constexpr pair insert(value_type&& x); // (3) C++26 -iterator insert(iterator position, const value_type& x); // (4) C++03 +iterator insert(iterator position, const value_type& x); // (4) C++98 iterator insert(const_iterator position, const value_type& x); // (4) C++11 constexpr iterator insert(const_iterator position, const value_type& x); // (4) C++26 @@ -29,7 +29,7 @@ iterator insert(const_iterator position, value_type&& x); // (6) C++17 constexpr iterator insert(const_iterator position, value_type&& x); // (6) C++26 template -void insert(InputIterator first, InputIterator last); // (7) C++03 +void insert(InputIterator first, InputIterator last); // (7) C++98 template constexpr void insert(InputIterator first, InputIterator last); // (7) C++26 @@ -126,8 +126,8 @@ constexpr iterator ## 備考 - これらの関数が呼ばれた後も、当該コンテナ内の要素を指す参照やイテレータは無効にはならない。 なお、規格書に明確な記載は無いが、当該コンテナ内の要素を指すポインタも無効にはならない。 -- (4), (5), (6): C++03 までの仕様では、計算量が償却定数時間となる条件は、「`position` が指す要素の**後ろ**に挿入された場合」となっているが、主要な実装はC++03時点から `position` が指す**前**に挿入する場合に償却定数時間となっていた。これは、`position` の後ろでは、適切な位置が先頭の場合に指定する方法がないこと、`vector::insert` の場合、`position` の前に挿入されること、STL のオリジナルである HP 社の実装が `position` の前に挿入する場合に償却定数時間であったことなどによる。 -- (7) : C++03 までの仕様では、`first` と `last` の間が昇順にソートされていた場合、計算量が線形時間となっていたが、この仕様は実現性がないため C++11 では削除された。(例えば、コンテナの既存の要素が 2 から 100 の偶数のみの場合に、1 から 99 のソートされた奇数の範囲を挿入する場合を考えてみよ) +- (4), (5), (6): C++98 までの仕様では、計算量が償却定数時間となる条件は、「`position` が指す要素の**後ろ**に挿入された場合」となっているが、主要な実装はC++98時点から `position` が指す**前**に挿入する場合に償却定数時間となっていた。これは、`position` の後ろでは、適切な位置が先頭の場合に指定する方法がないこと、`vector::insert` の場合、`position` の前に挿入されること、STL のオリジナルである HP 社の実装が `position` の前に挿入する場合に償却定数時間であったことなどによる。 +- (7) : C++98 までの仕様では、`first` と `last` の間が昇順にソートされていた場合、計算量が線形時間となっていたが、この仕様は実現性がないため C++11 では削除された。(例えば、コンテナの既存の要素が 2 から 100 の偶数のみの場合に、1 から 99 のソートされた奇数の範囲を挿入する場合を考えてみよ) - (9), (10) : 要素は、コピーもムーブもされない。 diff --git a/reference/map/map/key_comp.md b/reference/map/map/key_comp.md index 5d45358779..db4db58d3d 100644 --- a/reference/map/map/key_comp.md +++ b/reference/map/map/key_comp.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -key_compare key_comp() const; // (1) C++03 +key_compare key_comp() const; // (1) C++98 constexpr key_compare key_comp() const; // (1) C++26 ``` diff --git a/reference/map/map/lower_bound.md b/reference/map/map/lower_bound.md index 19ed957e2b..c1ff33df29 100644 --- a/reference/map/map/lower_bound.md +++ b/reference/map/map/lower_bound.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator lower_bound(const key_type& x); // (1) C++03 +iterator lower_bound(const key_type& x); // (1) C++98 constexpr iterator lower_bound(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator lower_bound(const K& x); // (2) C++14 template constexpr iterator lower_bound(const K& x); // (2) C++26 -const_iterator lower_bound(const key_type& x) const; // (3) C++03 +const_iterator lower_bound(const key_type& x) const; // (3) C++98 constexpr const_iterator lower_bound(const key_type& x) const; // (3) C++26 template diff --git a/reference/map/map/max_size.md b/reference/map/map/max_size.md index 944c431eda..f6ede1bf41 100644 --- a/reference/map/map/max_size.md +++ b/reference/map/map/max_size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type max_size() const; // (1) C++03 +size_type max_size() const; // (1) C++98 size_type max_size() const noexcept; // (1) C++11 constexpr size_type max_size() const noexcept; // (1) C++26 ``` diff --git a/reference/map/map/op_assign.md b/reference/map/map/op_assign.md index 9a5dec90c8..c1597f53ac 100644 --- a/reference/map/map/op_assign.md +++ b/reference/map/map/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -map& operator=(const map& x); // (1) C++03 +map& operator=(const map& x); // (1) C++98 constexpr map& operator=(const map& x); // (1) C++26 map& operator=(map&& x); // (2) C++11 diff --git a/reference/map/map/op_at.md b/reference/map/map/op_at.md index fd8c8362fc..a4f6610884 100644 --- a/reference/map/map/op_at.md +++ b/reference/map/map/op_at.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -T& operator[](const key_type& x); // (1) C++03 +T& operator[](const key_type& x); // (1) C++98 constexpr T& operator[](const key_type& x); // (1) C++26 T& operator[](key_type&& x); // (2) C++11 @@ -28,7 +28,7 @@ constexpr T& operator[](K&& x); // (3) C++26 ## 効果 - (1) : - - C++03 : `x`と等価なキーを持つ要素が存在しない場合、`value_type(x, T())`を挿入する + - C++98 : `x`と等価なキーを持つ要素が存在しない場合、`value_type(x, T())`を挿入する - C++17 : [`try_emplace`](try_emplace.md)`(x).first->second`と等価 - (2) : - C++11 : `x`と等価なキーを持つ要素が存在しない場合、`value_type(`[`move`](/reference/utility/move.md)`(x), T())`を挿入する diff --git a/reference/map/map/op_constructor.md b/reference/map/map/op_constructor.md index 3b3eae0b9e..c833287574 100644 --- a/reference/map/map/op_constructor.md +++ b/reference/map/map/op_constructor.md @@ -24,7 +24,7 @@ template map(InputIterator first, InputIterator last, const Compare& comp = Compare(), - const Allocator& alloc = Allocator()); // (4) C++03 + const Allocator& alloc = Allocator()); // (4) C++98 template constexpr map(InputIterator first, @@ -42,7 +42,7 @@ constexpr InputIterator last, const Allocator& alloc); // (5) C++26 -map(const map& x); // (6) C++03 +map(const map& x); // (6) C++98 constexpr map(const map& x); // (6) C++26 map(const map& x, const Allocator& alloc); // (7) C++11 diff --git a/reference/map/map/op_destructor.md b/reference/map/map/op_destructor.md index 271a9abc0a..424b846bdf 100644 --- a/reference/map/map/op_destructor.md +++ b/reference/map/map/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -~map(); // (1) C++03 +~map(); // (1) C++98 constexpr ~map(); // (1) C++26 ``` diff --git a/reference/map/map/op_equal.md b/reference/map/map/op_equal.md index 2295d541e2..db48eda7a2 100644 --- a/reference/map/map/op_equal.md +++ b/reference/map/map/op_equal.md @@ -8,7 +8,7 @@ namespace std { template bool operator==(const map& x, - const map& y); // (1) C++03 + const map& y); // (1) C++98 template constexpr bool operator==(const map& x, @@ -21,7 +21,7 @@ namespace std { ## 戻り値 -- C++03 : `x.`[`size`](size.md)`() == y.`[`size`](size.md)`() &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` +- C++98 : `x.`[`size`](size.md)`() == y.`[`size`](size.md)`() &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` - C++14 : [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`(), y.`[`end`](end.md)`());` diff --git a/reference/map/map/op_greater.md b/reference/map/map/op_greater.md index 9ac94b37fc..42bf503438 100644 --- a/reference/map/map/op_greater.md +++ b/reference/map/map/op_greater.md @@ -9,7 +9,7 @@ namespace std { template bool operator>(const map& x, - const map& y); // (1) C++03 + const map& y); // (1) C++98 template constexpr bool operator>(const map& x, diff --git a/reference/map/map/op_greater_equal.md b/reference/map/map/op_greater_equal.md index c118d6b020..d3c203d18e 100644 --- a/reference/map/map/op_greater_equal.md +++ b/reference/map/map/op_greater_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator>=(const map& x, - const map& y); // (1) C++03 + const map& y); // (1) C++98 template constexpr bool operator>=(const map& x, diff --git a/reference/map/map/op_less.md b/reference/map/map/op_less.md index 5a6307ec52..ec454b0a96 100644 --- a/reference/map/map/op_less.md +++ b/reference/map/map/op_less.md @@ -9,7 +9,7 @@ namespace std { template bool operator<(const map& x, - const map& y); // (1) C++03 + const map& y); // (1) C++98 template constexpr bool operator<(const map& x, diff --git a/reference/map/map/op_less_equal.md b/reference/map/map/op_less_equal.md index ad7322cdcc..aa75ccb037 100644 --- a/reference/map/map/op_less_equal.md +++ b/reference/map/map/op_less_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator<=(const map& x, - const map& y); // (1) C++03 + const map& y); // (1) C++98 template constexpr bool operator<=(const map& x, diff --git a/reference/map/map/op_not_equal.md b/reference/map/map/op_not_equal.md index 7ec44659c8..c92f8c3fca 100644 --- a/reference/map/map/op_not_equal.md +++ b/reference/map/map/op_not_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator!=(const map& x, - const map& y); // (1) C++03 + const map& y); // (1) C++98 template constexpr bool operator!=(const map& x, diff --git a/reference/map/map/rbegin.md b/reference/map/map/rbegin.md index 98aab9ac54..465ce80dd6 100644 --- a/reference/map/map/rbegin.md +++ b/reference/map/map/rbegin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rbegin(); // (1) C++03 +reverse_iterator rbegin(); // (1) C++98 reverse_iterator rbegin() noexcept; // (1) C++11 constexpr reverse_iterator rbegin() noexcept; // (1) C++26 -const_reverse_iterator rbegin() const; // (2) C++03 +const_reverse_iterator rbegin() const; // (2) C++98 const_reverse_iterator rbegin() const noexcept; // (2) C++11 constexpr const_reverse_iterator rbegin() const noexcept; // (2) C++26 ``` diff --git a/reference/map/map/rend.md b/reference/map/map/rend.md index f273a708a3..060772d7f4 100644 --- a/reference/map/map/rend.md +++ b/reference/map/map/rend.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rend(); // (1) C++03 +reverse_iterator rend(); // (1) C++98 reverse_iterator rend() noexcept; // (1) C++11 constexpr reverse_iterator rend() noexcept; // (1) C++26 -const_reverse_iterator rend() const; // (2) C++03 +const_reverse_iterator rend() const; // (2) C++98 const_reverse_iterator rend() const noexcept; // (2) C++11 constexpr const_reverse_iterator rend() const noexcept; // (2) C++26 ``` diff --git a/reference/map/map/size.md b/reference/map/map/size.md index cf0e6cb096..d3dd5523f4 100644 --- a/reference/map/map/size.md +++ b/reference/map/map/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type size() const; // (1) C++03 +size_type size() const; // (1) C++98 size_type size() const noexcept; // (1) C++11 constexpr size_type size() const noexcept; // (1) C++26 ``` @@ -55,7 +55,7 @@ int main () ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): ?? diff --git a/reference/map/map/swap.md b/reference/map/map/swap.md index 15b1658a85..7ce792ed5e 100644 --- a/reference/map/map/swap.md +++ b/reference/map/map/swap.md @@ -6,7 +6,7 @@ ```cpp void - swap(map& st); // (1) C++03 + swap(map& st); // (1) C++98 void swap(map& x) noexcept(allocator_traits::is_always_equal::value @@ -74,7 +74,7 @@ m2 : {[10,a], [20,b], [30,c], } ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): ?? diff --git a/reference/map/map/swap_free.md b/reference/map/map/swap_free.md index 31a8570d53..d14673942b 100644 --- a/reference/map/map/swap_free.md +++ b/reference/map/map/swap_free.md @@ -8,7 +8,7 @@ namespace std { template void swap(map& x, - map& y); // (1) C++03 + map& y); // (1) C++98 template void swap(map& x, @@ -84,7 +84,7 @@ m2 : {[10,a], [20,b], [30,c], } ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): ?? diff --git a/reference/map/map/upper_bound.md b/reference/map/map/upper_bound.md index 65b1a09b9d..8ee5c3535a 100644 --- a/reference/map/map/upper_bound.md +++ b/reference/map/map/upper_bound.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator upper_bound(const key_type& x); // (1) C++03 +iterator upper_bound(const key_type& x); // (1) C++98 constexpr iterator upper_bound(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator upper_bound(const K& x); // (2) C++14 template constexpr iterator upper_bound(const K& x); // (2) C++26 -const_iterator upper_bound(const key_type& x) const; // (3) C++03 +const_iterator upper_bound(const key_type& x) const; // (3) C++98 constexpr const_iterator upper_bound(const key_type& x) const; // (3) C++26 template diff --git a/reference/map/map/value_comp.md b/reference/map/map/value_comp.md index 14a732841b..2b4a337d0b 100644 --- a/reference/map/map/value_comp.md +++ b/reference/map/map/value_comp.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -value_compare value_comp() const; // (1) C++03 +value_compare value_comp() const; // (1) C++98 constexpr value_compare value_comp() const; // (1) C++26 ``` diff --git a/reference/map/map/value_compare.md b/reference/map/map/value_compare.md index de5bb33383..c412b2f162 100644 --- a/reference/map/map/value_compare.md +++ b/reference/map/map/value_compare.md @@ -39,7 +39,7 @@ namespace std { | `first_argument_type` | 関数オブジェクトとしての第一引数の型。[`map`](../../map.md)`::value_type` の別名 | C++17から非推奨 | | `second_argument_type` | 関数オブジェクトとしての第二引数の型。[`map`](../../map.md)`::value_type` の別名 | C++17から非推奨 | -これらのメンバ型は、C++03 までは [`binary_function`](../../functional/binary_function.md.nolink)`` を +これらのメンバ型は、C++98 までは [`binary_function`](../../functional/binary_function.md.nolink)`` を public 継承することによって定義していたが、C++11 から [`binary_function`](../../functional/binary_function.md.nolink) 等が非推奨になったことから [`binary_function`](../../functional/binary_function.md.nolink)`` を継承せずに、直接本クラス内で定義するように変更された。 diff --git a/reference/map/multimap.md b/reference/map/multimap.md index 060cba1795..50ae72ff63 100644 --- a/reference/map/multimap.md +++ b/reference/map/multimap.md @@ -134,8 +134,8 @@ namespace std { | `const_iterator` | 読み取り専用双方向イテレータ。 | | | `size_type` | 要素数を表す符号なし整数型。`difference_type` で表現可能な非負整数(0以上の整数)を表すことが可能。(通常は [`size_t`](/reference/cstddef/size_t.md)) | | | `difference_type` | 同一のコンテナを指す `iterator` の差を表す符号付き整数型(通常は [`ptrdiff_t`](/reference/cstddef/ptrdiff_t.md))
`std::`[`iterator_traits`](/reference/iterator/iterator_traits.md)`::difference_type`、および、`std::`[`iterator_traits`](/reference/iterator/iterator_traits.md)`::difference_type` と同じ。 | | -| `pointer` | 要素 `value_type`へのポインタ。
C++03 : `typename Allocator::pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::pointer`。 | | -| `const_pointer` | 要素 `value_type`への`const`ポインタ。
C++03 : `typename Allocator::const_pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::const_pointer`。 | | +| `pointer` | 要素 `value_type`へのポインタ。
C++98 : `typename Allocator::pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::pointer`。 | | +| `const_pointer` | 要素 `value_type`への`const`ポインタ。
C++98 : `typename Allocator::const_pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::const_pointer`。 | | | `reverse_iterator` | 逆順双方向イテレータ。`std::`[`reverse_iterator`](/reference/iterator/reverse_iterator.md)``。 | | | `const_reverse_iterator` | 読み取り専用逆順双方向イテレータ。`std::`[`reverse_iterator`](/reference/iterator/reverse_iterator.md)``。 | | | `node_type` | [`node_handle`](/reference/node_handle/node_handle.md)クラステンプレートの特殊化。 | C++17 | @@ -177,7 +177,7 @@ namespace std { ## 例 -### C++03版 +### C++98版 ```cpp example #include #include @@ -186,7 +186,7 @@ namespace std { int main() { // charをキー、intを値として扱う連想配列 - typedef std::multimap MCI; // C++03 では型名を何度も書く必要があるので typedef しておく + typedef std::multimap MCI; // C++98 では型名を何度も書く必要があるので typedef しておく MCI m; // 挿入 @@ -244,7 +244,7 @@ int main() * m.count[link multimap/count.md] * m.equal_range[link multimap/equal_range.md] -### 出力(C++03版、C++11版共通) +### 出力(C++98版、C++11版共通) ``` count = 2 10 diff --git a/reference/map/multimap/begin.md b/reference/map/multimap/begin.md index b1a3fa2fbe..adcd439ebb 100644 --- a/reference/map/multimap/begin.md +++ b/reference/map/multimap/begin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator begin(); // (1) C++03 +iterator begin(); // (1) C++98 iterator begin() noexcept; // (1) C++11 constexpr iterator begin() noexcept; // (1) C++26 -const_iterator begin() const; // (2) C++03 +const_iterator begin() const; // (2) C++98 const_iterator begin() const noexcept; // (2) C++11 constexpr const_iterator begin() const noexcept; // (2) C++26 ``` @@ -73,7 +73,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 2.9 [mark verified], 3.0 [mark verified], 3.1 [mark verified], 3.2 [mark verified], 3.3 [mark verified] diff --git a/reference/map/multimap/clear.md b/reference/map/multimap/clear.md index 7916dbb3b9..5004bf5f1d 100644 --- a/reference/map/multimap/clear.md +++ b/reference/map/multimap/clear.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void clear(); // (1) C++03 +void clear(); // (1) C++98 void clear() noexcept; // (1) C++11 constexpr void clear() noexcept; // (1) C++26 ``` @@ -55,7 +55,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): ?? diff --git a/reference/map/multimap/count.md b/reference/map/multimap/count.md index 4b159f12af..8924853b5f 100644 --- a/reference/map/multimap/count.md +++ b/reference/map/multimap/count.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type count(const key_type& x) const; // (1) C++03 +size_type count(const key_type& x) const; // (1) C++98 constexpr size_type count(const key_type& x) const; // (1) C++26 template diff --git a/reference/map/multimap/empty.md b/reference/map/multimap/empty.md index 3774649e03..f8379fb770 100644 --- a/reference/map/multimap/empty.md +++ b/reference/map/multimap/empty.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool empty() const; // (1) C++03 +bool empty() const; // (1) C++98 bool empty() const noexcept; // (1) C++11 [[nodiscard]] bool empty() const noexcept; // (1) C++20 constexpr bool empty() const noexcept; // (1) C++26 diff --git a/reference/map/multimap/end.md b/reference/map/multimap/end.md index ef2ea86a45..a01a6481b6 100644 --- a/reference/map/multimap/end.md +++ b/reference/map/multimap/end.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator end(); // (1) C++03 +iterator end(); // (1) C++98 iterator end() noexcept; // (1) C++11 constexpr iterator end() noexcept; // (1) C++26 -const_iterator end() const; // (2) C++03 +const_iterator end() const; // (2) C++98 const_iterator end() const noexcept; // (2) C++11 constexpr const_iterator end() const noexcept; // (2) C++26 ``` @@ -75,7 +75,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): 2.9 [mark verified], 3.0 [mark verified], 3.1 [mark verified], 3.2 [mark verified], 3.3 [mark verified] diff --git a/reference/map/multimap/equal_range.md b/reference/map/multimap/equal_range.md index e1667a7090..7f160e8b2d 100644 --- a/reference/map/multimap/equal_range.md +++ b/reference/map/multimap/equal_range.md @@ -6,7 +6,7 @@ ```cpp pair - equal_range(const key_type& x); // (1) C++03 + equal_range(const key_type& x); // (1) C++98 constexpr pair equal_range(const key_type& x); // (1) C++26 @@ -18,7 +18,7 @@ constexpr pair equal_range(const K& x); // (2) C++26 pair - equal_range(const key_type& x) const; // (3) C++03 + equal_range(const key_type& x) const; // (3) C++98 constexpr pair equal_range(const key_type& x) const; // (3) C++26 diff --git a/reference/map/multimap/erase.md b/reference/map/multimap/erase.md index 0483bc9d7c..d05b777d30 100644 --- a/reference/map/multimap/erase.md +++ b/reference/map/multimap/erase.md @@ -5,14 +5,14 @@ * function[meta id-type] ```cpp -void erase(iterator position); // (1) C++03 (C++11で一旦削除) +void erase(iterator position); // (1) C++98 (C++11で一旦削除) iterator erase(iterator position); // (1) C++17 constexpr iterator erase(iterator position); // (1) C++26 iterator erase(const_iterator position); // (2) C++11 constexpr iterator erase(const_iterator position); // (2) C++26 -size_type erase(const key_type& x); // (3) C++03 +size_type erase(const key_type& x); // (3) C++98 constexpr size_type erase(const key_type& x); // (3) C++26 template @@ -20,7 +20,7 @@ size_type erase(K&& x); // (4) C++23 template constexpr size_type erase(K&& x); // (4) C++26 -void erase(iterator first, iterator last); // (5) C++03 +void erase(iterator first, iterator last); // (5) C++98 iterator erase(const_iterator first, const_iterator last); // (5) C++11 constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++26 ``` @@ -45,12 +45,12 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 ## 戻り値 - (1) : - - C++03 : 戻り値なし + - C++98 : 戻り値なし - C++17 : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) - (2) : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) - (3), (4) : 削除された要素の数を返す - (5) : - - C++03 : 戻り値なし + - C++98 : 戻り値なし - C++11 : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) @@ -64,7 +64,7 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 - (1) : C++17で再追加されたこのオーバーロードは、それ以前の言語バージョンから使用できる可能性がある - (1), (2) : この関数に、範囲外のイテレータ (終端イテレータを含む) を指定した場合の動作は未定義 - 削除された要素を指すイテレータ、および、参照のみ無効になる。なお、規格書に明確な記載は無いが、削除された要素を指すポインタも無効になる。 -- ループ中で `multimap` の要素を削除するためには、C++03 までは以下のようなコードを書く必要があった。 +- ループ中で `multimap` の要素を削除するためには、C++98 までは以下のようなコードを書く必要があった。 ```cpp while (it != map_object.end()) { if (条件) { @@ -89,7 +89,7 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 ## 例 -### 基本的な使い方 (C++03) +### 基本的な使い方 (C++98) ```cpp example #include #include @@ -144,7 +144,7 @@ int main() // 条件一致した要素を削除する if (it->first == 1) { // 削除された要素の次を指すイテレータが返される。 - // C++03では、erase()の戻り値を使用せず、 m.erase(it++); のように書く + // C++98では、erase()の戻り値を使用せず、 m.erase(it++); のように書く it = m.erase(it); } // 要素削除をしない場合に、イテレータを進める diff --git a/reference/map/multimap/find.md b/reference/map/multimap/find.md index 87a1f3c1eb..ad6b95d445 100644 --- a/reference/map/multimap/find.md +++ b/reference/map/multimap/find.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator find(const key_type& x); // (1) C++03 +iterator find(const key_type& x); // (1) C++98 constexpr iterator find(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator find(const K& x); // (2) C++14 template constexpr iterator find(const K& x); // (2) C++26 -const_iterator find(const key_type& x) const; // (3) C++03 +const_iterator find(const key_type& x) const; // (3) C++98 constexpr const_iterator find(const key_type& x) const; // (3) C++26 template diff --git a/reference/map/multimap/get_allocator.md b/reference/map/multimap/get_allocator.md index 0a18dd2fac..27f159523d 100644 --- a/reference/map/multimap/get_allocator.md +++ b/reference/map/multimap/get_allocator.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -allocator_type get_allocator() const; // (1) C++03 +allocator_type get_allocator() const; // (1) C++98 allocator_type get_allocator() const noexcept; // (1) C++11 constexpr allocator_type get_allocator() const noexcept; // (1) C++26 ``` @@ -61,7 +61,7 @@ b ## バージョン ### 言語 -- C++03 +- C++98 - C++11 ### 処理系 diff --git a/reference/map/multimap/insert.md b/reference/map/multimap/insert.md index 70009aa8f2..f01b321698 100644 --- a/reference/map/multimap/insert.md +++ b/reference/map/multimap/insert.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator insert(const value_type& x); // (1) C++03 +iterator insert(const value_type& x); // (1) C++98 constexpr iterator insert(const value_type& x); // (1) C++26 iterator insert(value_type&& y); // (2) C++17 @@ -16,7 +16,7 @@ iterator insert(P&& x); // (3) C++11 template constexpr iterator insert(P&& x); // (3) C++26 -iterator insert(iterator position, const value_type& x); // (4) C++03 +iterator insert(iterator position, const value_type& x); // (4) C++98 iterator insert(const_iterator position, const value_type& x); // (4) C++11 constexpr iterator insert(const_iterator position, const value_type& x); // (4) C++26 @@ -29,7 +29,7 @@ template constexpr iterator insert(const_iterator position, P&& x); // (6) C++26 template -void insert(InputIterator first, InputIterator last); // (7) C++03 +void insert(InputIterator first, InputIterator last); // (7) C++98 template constexpr void insert(InputIterator first, InputIterator last); // (7) C++26 diff --git a/reference/map/multimap/key_comp.md b/reference/map/multimap/key_comp.md index 0bc86a3493..9dae22a3b2 100644 --- a/reference/map/multimap/key_comp.md +++ b/reference/map/multimap/key_comp.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -key_compare key_comp() const; // (1) C++03 +key_compare key_comp() const; // (1) C++98 constexpr key_compare key_comp() const; // (1) C++26 ``` diff --git a/reference/map/multimap/lower_bound.md b/reference/map/multimap/lower_bound.md index 0571b722d6..48c797f336 100644 --- a/reference/map/multimap/lower_bound.md +++ b/reference/map/multimap/lower_bound.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator lower_bound(const key_type& x); // (1) C++03 +iterator lower_bound(const key_type& x); // (1) C++98 constexpr iterator lower_bound(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator lower_bound(const K& x); // (2) C++14 template constexpr iterator lower_bound(const K& x); // (2) C++26 -const_iterator lower_bound(const key_type& x) const; // (3) C++03 +const_iterator lower_bound(const key_type& x) const; // (3) C++98 constexpr const_iterator lower_bound(const key_type& x) const; // (3) C++26 template diff --git a/reference/map/multimap/max_size.md b/reference/map/multimap/max_size.md index 8c10e11a11..3058a32c66 100644 --- a/reference/map/multimap/max_size.md +++ b/reference/map/multimap/max_size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type max_size() const; // (1) C++03 +size_type max_size() const; // (1) C++98 size_type max_size() const noexcept; // (1) C++11 constexpr size_type max_size() const noexcept; // (1) C++26 ``` diff --git a/reference/map/multimap/op_assign.md b/reference/map/multimap/op_assign.md index 68abd07d8f..efbe1be892 100644 --- a/reference/map/multimap/op_assign.md +++ b/reference/map/multimap/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -multimap& operator=(const multimap& x); // (1) C++03 +multimap& operator=(const multimap& x); // (1) C++98 constexpr multimap& operator=(const multimap& x); // (1) C++26 multimap& operator=(multimap&& x); // (2) C++11 diff --git a/reference/map/multimap/op_constructor.md b/reference/map/multimap/op_constructor.md index 02f14f55c7..582f70c85b 100644 --- a/reference/map/multimap/op_constructor.md +++ b/reference/map/multimap/op_constructor.md @@ -25,7 +25,7 @@ template multimap(InputIterator first, InputIterator last, const Compare& comp = Compare(), - const Allocator& alloc = Allocator()); // (4) C++03 + const Allocator& alloc = Allocator()); // (4) C++98 template constexpr multimap(InputIterator first, @@ -43,7 +43,7 @@ constexpr InputIterator last, const Allocator& alloc); // (5) C++26 -multimap(const multimap& x); // (6) C++03 +multimap(const multimap& x); // (6) C++98 constexpr multimap(const multimap& x); // (6) C++26 multimap(const multimap& x, diff --git a/reference/map/multimap/op_destructor.md b/reference/map/multimap/op_destructor.md index 79209f4d84..994c9e6493 100644 --- a/reference/map/multimap/op_destructor.md +++ b/reference/map/multimap/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -~multimap(); // (1) C++03 +~multimap(); // (1) C++98 constexpr ~multimap(); // (1) C++26 ``` diff --git a/reference/map/multimap/op_equal.md b/reference/map/multimap/op_equal.md index 97d1500c3c..bdd0a4092c 100644 --- a/reference/map/multimap/op_equal.md +++ b/reference/map/multimap/op_equal.md @@ -8,7 +8,7 @@ namespace std { template bool operator==(const multimap& x, - const multimap& y); // (1) C++03 + const multimap& y); // (1) C++98 template constexpr bool operator==(const multimap& x, @@ -21,7 +21,7 @@ namespace std { ## 戻り値 -- C++03 : `x.`[`size`](size.md)`() == y.`[`size`](size.md)`() &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` +- C++98 : `x.`[`size`](size.md)`() == y.`[`size`](size.md)`() &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` - C++14 : [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`(), y.`[`end`](end.md)`());` diff --git a/reference/map/multimap/op_greater.md b/reference/map/multimap/op_greater.md index 26ab76de32..6a0ad27b46 100644 --- a/reference/map/multimap/op_greater.md +++ b/reference/map/multimap/op_greater.md @@ -9,7 +9,7 @@ namespace std { template bool operator>(const multimap& x, - const multimap& y); // (1) C++03 + const multimap& y); // (1) C++98 template constexpr bool operator>(const multimap& x, diff --git a/reference/map/multimap/op_greater_equal.md b/reference/map/multimap/op_greater_equal.md index 6011331187..941d82f430 100644 --- a/reference/map/multimap/op_greater_equal.md +++ b/reference/map/multimap/op_greater_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator>=(const multimap& x, - const multimap& y); // (1) C++03 + const multimap& y); // (1) C++98 template constexpr bool operator>=(const multimap& x, diff --git a/reference/map/multimap/op_less.md b/reference/map/multimap/op_less.md index 585c114f67..0ac74f1a48 100644 --- a/reference/map/multimap/op_less.md +++ b/reference/map/multimap/op_less.md @@ -9,7 +9,7 @@ namespace std { template bool operator<(const multimap& x, - const multimap& y); // (1) C++03 + const multimap& y); // (1) C++98 template constexpr bool operator<(const multimap& x, diff --git a/reference/map/multimap/op_less_equal.md b/reference/map/multimap/op_less_equal.md index 7aad0e15eb..185563e71a 100644 --- a/reference/map/multimap/op_less_equal.md +++ b/reference/map/multimap/op_less_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator<=(const multimap& x, - const multimap& y); // (1) C++03 + const multimap& y); // (1) C++98 template constexpr bool operator<=(const multimap& x, diff --git a/reference/map/multimap/op_not_equal.md b/reference/map/multimap/op_not_equal.md index 038e6fd7c4..4b768a5900 100644 --- a/reference/map/multimap/op_not_equal.md +++ b/reference/map/multimap/op_not_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator!=(const multimap& x, - const multimap& y); // (1) C++03 + const multimap& y); // (1) C++98 template constexpr bool operator!=(const multimap& x, diff --git a/reference/map/multimap/rbegin.md b/reference/map/multimap/rbegin.md index ff1d5cc272..6ac73753b9 100644 --- a/reference/map/multimap/rbegin.md +++ b/reference/map/multimap/rbegin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rbegin(); // (1) C++03 +reverse_iterator rbegin(); // (1) C++98 reverse_iterator rbegin() noexcept; // (1) C++11 constexpr reverse_iterator rbegin() noexcept; // (1) C++26 -const_reverse_iterator rbegin() const; // (2) C++03 +const_reverse_iterator rbegin() const; // (2) C++98 const_reverse_iterator rbegin() const noexcept; // (2) C++11 constexpr const_reverse_iterator rbegin() const noexcept; // (2) C++26 ``` diff --git a/reference/map/multimap/rend.md b/reference/map/multimap/rend.md index aa06f4f32a..147424540e 100644 --- a/reference/map/multimap/rend.md +++ b/reference/map/multimap/rend.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rend(); // (1) C++03 +reverse_iterator rend(); // (1) C++98 reverse_iterator rend() noexcept; // (1) C++11 constexpr reverse_iterator rend() noexcept; // (1) C++26 -const_reverse_iterator rend() const; // (2) C++03 +const_reverse_iterator rend() const; // (2) C++98 const_reverse_iterator rend() const noexcept; // (2) C++11 constexpr const_reverse_iterator rend() const noexcept; // (2) C++26 ``` diff --git a/reference/map/multimap/size.md b/reference/map/multimap/size.md index bfb9fee597..1fb080777c 100644 --- a/reference/map/multimap/size.md +++ b/reference/map/multimap/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type size() const; // (1) C++03 +size_type size() const; // (1) C++98 size_type size() const noexcept; // (1) C++11 constexpr size_type size() const noexcept; // (1) C++26 ``` @@ -55,7 +55,7 @@ int main () ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): ?? diff --git a/reference/map/multimap/swap.md b/reference/map/multimap/swap.md index 715658e567..fe1c68ff24 100644 --- a/reference/map/multimap/swap.md +++ b/reference/map/multimap/swap.md @@ -6,7 +6,7 @@ ```cpp void - swap(multimap& st); // (1) C++03 + swap(multimap& st); // (1) C++98 void swap(multimap& x) noexcept(allocator_traits::is_always_equal::value @@ -74,7 +74,7 @@ m2 : {[10,a], [20,b], [30,c], } ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): ?? diff --git a/reference/map/multimap/swap_free.md b/reference/map/multimap/swap_free.md index de561abf98..c2838a7b03 100644 --- a/reference/map/multimap/swap_free.md +++ b/reference/map/multimap/swap_free.md @@ -8,7 +8,7 @@ namespace std { template void swap(multimap& x, - multimap& y); // (1) C++03 + multimap& y); // (1) C++98 template void swap(multimap& x, @@ -83,7 +83,7 @@ m2 : {[10,a], [20,b], [30,c], } ## バージョン ### 言語 -- C++03 +- C++98 ### 処理系 - [Clang](/implementation.md#clang): ?? diff --git a/reference/map/multimap/upper_bound.md b/reference/map/multimap/upper_bound.md index daffa94905..b7af48d0a4 100644 --- a/reference/map/multimap/upper_bound.md +++ b/reference/map/multimap/upper_bound.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator upper_bound(const key_type& x); // (1) C++03 +iterator upper_bound(const key_type& x); // (1) C++98 constexpr iterator upper_bound(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator upper_bound(const K& x); // (2) C++14 template constexpr iterator upper_bound(const K& x); // (2) C++26 -const_iterator upper_bound(const key_type& x) const; // (3) C++03 +const_iterator upper_bound(const key_type& x) const; // (3) C++98 constexpr const_iterator upper_bound(const key_type& x) const; // (3) C++26 template diff --git a/reference/map/multimap/value_comp.md b/reference/map/multimap/value_comp.md index 73e5d81e00..d5e42d5c92 100644 --- a/reference/map/multimap/value_comp.md +++ b/reference/map/multimap/value_comp.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -value_compare value_comp() const; // (1) C++03 +value_compare value_comp() const; // (1) C++98 constexpr value_compare value_comp() const; // (1) C++26 ``` diff --git a/reference/memory/allocator/address.md b/reference/memory/allocator/address.md index e43d533461..3409061a25 100644 --- a/reference/memory/allocator/address.md +++ b/reference/memory/allocator/address.md @@ -7,10 +7,10 @@ * cpp20removed[meta cpp] ```cpp -pointer address(reference x) const; // (1) C++03 +pointer address(reference x) const; // (1) C++98 pointer address(reference x) const noexcept; // (1) C++11 -const_pointer address(const_reference x) const; // (2) C++03 +const_pointer address(const_reference x) const; // (2) C++98 const_pointer address(const_reference x) const noexcept; // (2) C++11 ``` @@ -22,7 +22,7 @@ const_pointer address(const_reference x) const noexcept; // (2) C++11 ## 戻り値 -- C++03 : `&x` +- C++98 : `&x` - C++11 : `operator&`がオーバーロードされていたとしても、`x`が参照するオブジェクトのアドレスを返す。 diff --git a/reference/memory/allocator/allocate.md b/reference/memory/allocator/allocate.md index 1d9feab6d9..35e9b62e5c 100644 --- a/reference/memory/allocator/allocate.md +++ b/reference/memory/allocator/allocate.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -pointer allocate(size_type n); // (1) C++03 +pointer allocate(size_type n); // (1) C++98 [[nodiscard]] constexpr pointer allocate(size_type n); // (1) C++20 constexpr pointer allocate(size_type n); // (1) C++26 @@ -29,7 +29,7 @@ pointer allocate(size_type n, 要求サイズが乗算オーバーフローを起こす(`SIZE_MAX / sizeof(T) < n`である)場合の扱いは、バージョンによって異なる。 -- C++03 : この場合の例外は規定されていない +- C++98 : この場合の例外は規定されていない - C++20 : [`bad_array_new_length`](/reference/new/bad_array_new_length.md)例外を送出する diff --git a/reference/memory/allocator/construct.md b/reference/memory/allocator/construct.md index 55dcca99ef..7091d18542 100644 --- a/reference/memory/allocator/construct.md +++ b/reference/memory/allocator/construct.md @@ -7,7 +7,7 @@ * cpp20removed[meta cpp] ```cpp -// C++03 +// C++98 void construct(pointer p, const T& val); // C++11 @@ -23,7 +23,7 @@ void construct(U* p, Args&&... args); ## 効果 -- C++03 : `new((void *)p) T(val)` +- C++98 : `new((void *)p) T(val)` - C++11 : `::new((void *)p) U(`[`std::forward`](/reference/utility/forward.md)`(args)...)` diff --git a/reference/memory/allocator/destroy.md b/reference/memory/allocator/destroy.md index cf65df1d40..27ef8dd6d8 100644 --- a/reference/memory/allocator/destroy.md +++ b/reference/memory/allocator/destroy.md @@ -7,7 +7,7 @@ * cpp20removed[meta cpp] ```cpp -// C++03 +// C++98 void destroy(pointer p); // C++11 @@ -23,7 +23,7 @@ void destroy(U* p); ## 効果 -- C++03 : `((T*)p)->~T()` +- C++98 : `((T*)p)->~T()` - C++11 : `p->~U()` diff --git a/reference/memory/allocator/max_size.md b/reference/memory/allocator/max_size.md index 3a0e917fda..43e850ae88 100644 --- a/reference/memory/allocator/max_size.md +++ b/reference/memory/allocator/max_size.md @@ -7,7 +7,7 @@ * cpp20removed[meta cpp] ```cpp -size_type max_size() const throw(); // C++03 +size_type max_size() const throw(); // C++98 size_type max_size() const noexcept; // C++11 ``` diff --git a/reference/memory/allocator/op_assign.md b/reference/memory/allocator/op_assign.md index 4b753af31b..31e5eb5c39 100644 --- a/reference/memory/allocator/op_assign.md +++ b/reference/memory/allocator/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -allocator& operator=(const allocator&); // (1) C++03 (暗黙定義) +allocator& operator=(const allocator&); // (1) C++98 (暗黙定義) allocator& operator=(const allocator&) = default; // (1) C++11 constexpr allocator& operator=(const allocator&) = default; // (1) C++20 ``` diff --git a/reference/memory/allocator/op_constructor.md b/reference/memory/allocator/op_constructor.md index 2ce5ef7883..c99b4a29f1 100644 --- a/reference/memory/allocator/op_constructor.md +++ b/reference/memory/allocator/op_constructor.md @@ -5,16 +5,16 @@ * function[meta id-type] ```cpp -allocator() throw(); // (1) C++03 まで +allocator() throw(); // (1) C++98 まで allocator() noexcept; // (1) C++11 から C++17 まで constexpr allocator() noexcept; // (1) C++20 から -allocator(const allocator&) throw(); // (2) C++03 まで +allocator(const allocator&) throw(); // (2) C++98 まで allocator(const allocator&) noexcept; // (2) C++11 から C++17 まで constexpr allocator(const allocator&) noexcept; // (2) C++20 から template -allocator(const allocator&) throw(); // (3) C++03 まで +allocator(const allocator&) throw(); // (3) C++98 まで template allocator(const allocator&) noexcept; // (3) C++11 から C++17 まで diff --git a/reference/memory/allocator/op_destructor.md b/reference/memory/allocator/op_destructor.md index 5b8b9efe1a..72171d5969 100644 --- a/reference/memory/allocator/op_destructor.md +++ b/reference/memory/allocator/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -~allocator() throw(); // C++03 まで +~allocator() throw(); // C++98 まで ~allocator(); // C++11 から C++17 まで constexpr ~allocator(); // C++20 から ``` diff --git a/reference/memory/allocator/op_equal.md b/reference/memory/allocator/op_equal.md index fc1e498872..51d0d6f6d4 100644 --- a/reference/memory/allocator/op_equal.md +++ b/reference/memory/allocator/op_equal.md @@ -7,7 +7,7 @@ namespace std { template bool operator==(const allocator&, - const allocator&) throw(); // (1) C++03 + const allocator&) throw(); // (1) C++98 template bool operator==(const allocator&, diff --git a/reference/memory/allocator/op_not_equal.md b/reference/memory/allocator/op_not_equal.md index 961b68b151..524959fcd4 100644 --- a/reference/memory/allocator/op_not_equal.md +++ b/reference/memory/allocator/op_not_equal.md @@ -8,7 +8,7 @@ namespace std { // operator==により、以下のオーバーロードが使用可能になる (C++20) template bool operator!=(const allocator&, - const allocator&) throw(); // (1) C++03 + const allocator&) throw(); // (1) C++98 template bool operator!=(const allocator&, diff --git a/reference/memory/get_temporary_buffer.md b/reference/memory/get_temporary_buffer.md index 43e9a968f4..0b417cba25 100644 --- a/reference/memory/get_temporary_buffer.md +++ b/reference/memory/get_temporary_buffer.md @@ -6,7 +6,7 @@ * cpp20removed[meta cpp] ```cpp -// C++03 +// C++98 template pair get_temporary_buffer(ptrdiff_t n); diff --git a/reference/memory/pointer_safety.md b/reference/memory/pointer_safety.md index d9581bcec8..792c137192 100644 --- a/reference/memory/pointer_safety.md +++ b/reference/memory/pointer_safety.md @@ -30,7 +30,7 @@ namespace std { | 列挙値 | 説明 | 対応バージョン | |-------------|-----------------------------------------------------------------------------------------|-------| -| `relaxed` | Safety-Derived なポインタもそうでないポインタも同様に扱われる。 (C++03 までと同じ) | C++11 | +| `relaxed` | Safety-Derived なポインタもそうでないポインタも同様に扱われる。 (C++98 までと同じ) | C++11 | | `preferred` | `relaxed`と同様。ただしリークに関するレポート(ヒント)を実装することを許可する。 | C++11 | | `strict` | この環境では厳密な実装が行われており、Safety-Derived と 非Safety-Derived は区別される。 | C++11 | diff --git a/reference/memory/uninitialized_copy.md b/reference/memory/uninitialized_copy.md index a5e5d0f908..71de7f11ca 100644 --- a/reference/memory/uninitialized_copy.md +++ b/reference/memory/uninitialized_copy.md @@ -9,7 +9,7 @@ namespace std { ForwardIterator uninitialized_copy(InputIterator first, InputIterator last, - ForwardIterator result); // (1) C++03 + ForwardIterator result); // (1) C++98 template constexpr ForwardIterator uninitialized_copy(InputIterator first, @@ -35,7 +35,7 @@ namespace std { - イテレータ範囲`[result, result + (last - first))`が`[first, last)`と重ならないこと ## 効果 -- C++03 : 以下と等価 +- C++98 : 以下と等価 ```cpp for (; first != last; ++result, ++first) ::new (static_cast(&*result)) diff --git a/reference/memory/uninitialized_fill.md b/reference/memory/uninitialized_fill.md index 6986b3d8f2..37bf9c3298 100644 --- a/reference/memory/uninitialized_fill.md +++ b/reference/memory/uninitialized_fill.md @@ -9,7 +9,7 @@ namespace std { void uninitialized_fill(ForwardIterator first, ForwardIterator last, - const T& x); // (1) C++03 + const T& x); // (1) C++98 template ::value_type> constexpr void @@ -41,7 +41,7 @@ namespace std { ## 効果 -- C++03 : 以下と等価 +- C++98 : 以下と等価 ```cpp for (; first != last; ++first) ::new (static_cast(&*first)) diff --git a/reference/memory/uninitialized_fill_n.md b/reference/memory/uninitialized_fill_n.md index e014b625b3..a9847699db 100644 --- a/reference/memory/uninitialized_fill_n.md +++ b/reference/memory/uninitialized_fill_n.md @@ -9,7 +9,7 @@ namespace std { ForwardIterator uninitialized_fill_n(ForwardIterator first, Size n, - const T& x); // (1) C++03 + const T& x); // (1) C++98 template ::value_type> @@ -43,7 +43,7 @@ namespace std { ## 効果 -- C++03 : 以下と等価 +- C++98 : 以下と等価 ```cpp for (; n--; ++first) ::new (static_cast(&*first)) diff --git a/reference/new/bad_alloc/op_assign.md b/reference/new/bad_alloc/op_assign.md index 074a6116c7..03e850de85 100644 --- a/reference/new/bad_alloc/op_assign.md +++ b/reference/new/bad_alloc/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bad_alloc& operator=(const bad_alloc&); // (1) C++03 +bad_alloc& operator=(const bad_alloc&); // (1) C++98 bad_alloc& operator=(const bad_alloc&) noexcept; // (1) C++11 constexpr bad_alloc& operator=(const bad_alloc&) noexcept; // (1) C++26 ``` diff --git a/reference/new/bad_alloc/op_constructor.md b/reference/new/bad_alloc/op_constructor.md index b127eb6c2e..63c592700c 100644 --- a/reference/new/bad_alloc/op_constructor.md +++ b/reference/new/bad_alloc/op_constructor.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -bad_alloc(); // (1) C++03 +bad_alloc(); // (1) C++98 bad_alloc() noexcept; // (1) C++11 constexpr bad_alloc() noexcept; // (1) C++26 -bad_alloc(const bad_alloc&); // (2) C++03 +bad_alloc(const bad_alloc&); // (2) C++98 bad_alloc(const bad_alloc&) noexcept; // (2) C++11 constexpr bad_alloc(const bad_alloc&) noexcept; // (2) C++26 ``` diff --git a/reference/new/bad_alloc/op_destructor.md b/reference/new/bad_alloc/op_destructor.md index f5c4cc916b..f5776f3ec6 100644 --- a/reference/new/bad_alloc/op_destructor.md +++ b/reference/new/bad_alloc/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -virtual ~bad_alloc(); // (1) C++03 +virtual ~bad_alloc(); // (1) C++98 constexpr virtual ~bad_alloc(); // (1) C++26 ``` diff --git a/reference/new/bad_alloc/what.md b/reference/new/bad_alloc/what.md index 4994fd31d1..fd43cf3ffe 100644 --- a/reference/new/bad_alloc/what.md +++ b/reference/new/bad_alloc/what.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -virtual const char* what() const; // (1) C++03 +virtual const char* what() const; // (1) C++98 virtual const char* what() const noexcept; // (1) C++11 const char* what() const noexcept override; // (1) C++17 constexpr const char* what() const noexcept override; // (1) C++26 diff --git a/reference/new/op_delete.md b/reference/new/op_delete.md index aa364aab62..ede81627b9 100644 --- a/reference/new/op_delete.md +++ b/reference/new/op_delete.md @@ -4,7 +4,7 @@ * [meta namespace] ```cpp -void operator delete(void* ptr) throw(); // (1) C++03 まで +void operator delete(void* ptr) throw(); // (1) C++98 まで void operator delete(void* ptr) noexcept; // (1) C++11 から void operator delete(void* ptr, std::size_t size) noexcept; // (2) C++14 から @@ -13,12 +13,12 @@ void operator delete(void* ptr, std::align_val_t alignment) noexcept; void operator delete(void* ptr, std::size_t size, std::align_val_t alignment) noexcept; // (4) C++17 から -void operator delete(void* ptr, const std::nothrow_t&) throw(); // (5) C++03 まで +void operator delete(void* ptr, const std::nothrow_t&) throw(); // (5) C++98 まで void operator delete(void* ptr, const std::nothrow_t&) noexcept; // (5) C++11 から void operator delete(void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept; // (6) C++17 から -void operator delete(void* ptr, void*) throw(); // (7) C++03 まで +void operator delete(void* ptr, void*) throw(); // (7) C++98 まで void operator delete(void* ptr, void*) noexcept; // (7) C++11 から constexpr void operator delete(void* ptr, void*) noexcept; // (7) C++26 から ``` diff --git a/reference/new/op_delete[].md b/reference/new/op_delete[].md index f70d3af434..4108cbc675 100644 --- a/reference/new/op_delete[].md +++ b/reference/new/op_delete[].md @@ -4,7 +4,7 @@ * [meta namespace] ```cpp -void operator delete[](void* ptr) throw(); // (1) C++03 まで +void operator delete[](void* ptr) throw(); // (1) C++98 まで void operator delete[](void* ptr) noexcept; // (1) C++11 から void operator delete[](void* ptr, std::size_t size) noexcept; // (2) C++14 から @@ -13,12 +13,12 @@ void operator delete[](void* ptr, std::align_val_t alignment) noexcept; void operator delete[](void* ptr, std::size_t size, std::align_val_t alignment) noexcept; // (4) C++17 から -void operator delete[](void* ptr, const std::nothrow_t&) throw(); // (5) C++03 まで +void operator delete[](void* ptr, const std::nothrow_t&) throw(); // (5) C++98 まで void operator delete[](void* ptr, const std::nothrow_t&) noexcept; // (5) C++11 から void operator delete[](void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept; // (6) C++17 から -void operator delete[](void* ptr, void*) throw(); // (7) C++03 まで +void operator delete[](void* ptr, void*) throw(); // (7) C++98 まで void operator delete[](void* ptr, void*) noexcept; // (7) C++11 から constexpr void operator delete[](void* ptr, void*) noexcept; // (7) C++26 から ``` diff --git a/reference/new/op_new.md b/reference/new/op_new.md index ce4f884df0..f34c07b010 100644 --- a/reference/new/op_new.md +++ b/reference/new/op_new.md @@ -4,7 +4,7 @@ * [meta namespace] ```cpp -void* operator new(std::size_t size) throw(std::bad_alloc); // (1) C++03 +void* operator new(std::size_t size) throw(std::bad_alloc); // (1) C++98 void* operator new(std::size_t size); // (1) C++11 [[nodiscard]] void* operator new(std::size_t size); // (1) C++20 void* operator new(std::size_t size); // (1) C++26 @@ -17,7 +17,7 @@ void* operator new(std::size_t size, std::align_val_t alignment); // (2) C++26 void* operator new(std::size_t size, - const std::nothrow_t&) throw(); // (3) C++03 + const std::nothrow_t&) throw(); // (3) C++98 void* operator new(std::size_t size, const std::nothrow_t&) noexcept; // (3) C++11 [[nodiscard]] void* operator new(std::size_t size, @@ -35,7 +35,7 @@ void* operator new(std::size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept; // (4) C++26 -void* operator new(std::size_t size, void* ptr) throw(); // (5) C++03 +void* operator new(std::size_t size, void* ptr) throw(); // (5) C++98 void* operator new(std::size_t size, void* ptr) noexcept; // (5) C++11 [[nodiscard]] void* operator new(std::size_t size, void* ptr) noexcept; // (5) C++20 @@ -105,14 +105,14 @@ constexpr void* operator new(std::size_t size, なお、[`new_handler`](new_handler.md) は [`bad_alloc`](bad_alloc.md) 例外を送出したり、呼び出し元に戻らなかったりすることがあるので注意。 -- (3) の形式の詳細な正確な挙動は、以下の通り C++03 までと C++11 以降で異なる。 - - C++03 までの場合、(1) の形式とほぼ同様の処理を行うが、記憶域が確保できなかったり、現在の [`new_handler`](new_handler.md) が[`bad_alloc`](bad_alloc.md) 例外を送出したりした場合には、ヌルポインタを返す。 +- (3) の形式の詳細な正確な挙動は、以下の通り C++98 までと C++11 以降で異なる。 + - C++98 までの場合、(1) の形式とほぼ同様の処理を行うが、記憶域が確保できなかったり、現在の [`new_handler`](new_handler.md) が[`bad_alloc`](bad_alloc.md) 例外を送出したりした場合には、ヌルポインタを返す。 - C++11 以降の場合、(1) の形式を呼び出し、[`bad_alloc`](bad_alloc.md) 例外が送出された場合には、ヌルポインタを返す。 - この差は、利用者が `operator new` を置き換えていない場合には顕在化しないが、利用者が (1) の形式のみを置き換えた場合、C++03 までは (2) の形式を呼び出しても置き換えられたバージョンは呼び出されない。 + この差は、利用者が `operator new` を置き換えていない場合には顕在化しないが、利用者が (1) の形式のみを置き換えた場合、C++98 までは (2) の形式を呼び出しても置き換えられたバージョンは呼び出されない。 `new` 式と異なり、`delete` 式には配置構文が存在しないため、(3) の形式で確保した記憶域も通常の `delete` 式で解放することになる(コンストラクタで例外が送出された場合を除く。[`operator delete`](op_delete.md)も参照)。 - 従って、C++03 までの場合、(1) の形式を利用者提供の関数で置き換える場合は、(3) の形式も (1) の形式と同様の記憶域確保を行う利用者提供の関数で置き換えるべきである。その場合、C++11 の (3) の形式のように、(1) を呼び出した上で例外ハンドリングする方法が安全確実な方法である。 - なお、C++11 からは (3) の形式は (1) を呼び出すことになっているため、 (1) の形式のみを置き換えれば問題はないが、C++03 までのバージョンでも同様に動くようにするため、あるいは、標準ライブラリのバグで (3) の形式が (1) の形式を呼び出していない可能性もあるため、(3) の形式も提供した方が良いかもしれない。 + 従って、C++98 までの場合、(1) の形式を利用者提供の関数で置き換える場合は、(3) の形式も (1) の形式と同様の記憶域確保を行う利用者提供の関数で置き換えるべきである。その場合、C++11 の (3) の形式のように、(1) を呼び出した上で例外ハンドリングする方法が安全確実な方法である。 + なお、C++11 からは (3) の形式は (1) を呼び出すことになっているため、 (1) の形式のみを置き換えれば問題はないが、C++98 までのバージョンでも同様に動くようにするため、あるいは、標準ライブラリのバグで (3) の形式が (1) の形式を呼び出していない可能性もあるため、(3) の形式も提供した方が良いかもしれない。 - (5) の形式は、実質何もしていない。この形式は、記憶域を確保した上でそこに新たなオブジェクトを構築するのではなく、あらかじめ確保されている記憶域上に新たなオブジェクトを構築するのに用いられる。 一般に、プログラム実行中の記憶域の動的確保は、処理系が OS からヒープを確保するのに対し、(5) の形式では、既にプログラムに確保済みの任意の記憶域上にオブジェクトを構築するため、上手く使った場合には `new` / `delete` を大量に繰り返す必要のある処理を高速に実現しうる。 diff --git a/reference/new/op_new[].md b/reference/new/op_new[].md index c06263c1ca..a25c2ed1ee 100644 --- a/reference/new/op_new[].md +++ b/reference/new/op_new[].md @@ -4,7 +4,7 @@ * [meta namespace] ```cpp -void* operator new[](std::size_t size) throw(std::bad_alloc); // (1) C++03 +void* operator new[](std::size_t size) throw(std::bad_alloc); // (1) C++98 void* operator new[](std::size_t size); // (1) C++11 [[nodiscard]] void* operator new[](std::size_t size); // (1) C++20 void* operator new[](std::size_t size); // (1) C++26 @@ -18,7 +18,7 @@ void* operator new[](std::size_t size, std::align_val_t alignment); // (2) C++26 void* operator new[](std::size_t size, - const std::nothrow_t&) throw(); // (3) C++03 + const std::nothrow_t&) throw(); // (3) C++98 void* operator new[](std::size_t size, const std::nothrow_t&) noexcept; // (3) C++11 [[nodiscard]] void* operator new[](std::size_t size, @@ -36,7 +36,7 @@ void* operator new[](std::size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept; // (4) C++26 -void* operator new[](std::size_t size, void* ptr) throw(); // (5) C++03 +void* operator new[](std::size_t size, void* ptr) throw(); // (5) C++98 void* operator new[](std::size_t size, void* ptr) noexcept; // (5) C++11 [[nodiscard]] void* operator new[](std::size_t size, void* ptr) noexcept; // (5) C++20 constexpr void* operator new[](std::size_t size, void* ptr) noexcept; // (5) C++26 @@ -58,8 +58,8 @@ constexpr void* operator new[](std::size_t size, void* ptr) noexcept; // (5) ## 効果 - (1), (2) : [`operator new`](op_new.md)`(size)` を呼び出す。アライメントに関しては単一オブジェクト版と同様に動作する。 -- (3), (4) : C++03 までと C++11 からで異なる。 - - C++03 まで:[`operator new`](op_new.md)`(size, std::`[`nothrow`](nothrow_t.md)`)` を呼び出す。 +- (3), (4) : C++98 までと C++11 からで異なる。 + - C++98 まで:[`operator new`](op_new.md)`(size, std::`[`nothrow`](nothrow_t.md)`)` を呼び出す。 - C++11 から:(1) の形式を `operator new[](size)` で呼び出す。ただし、記憶域の確保に失敗しても例外を送出しない。 - (5) : 何もしない。 @@ -67,7 +67,7 @@ constexpr void* operator new[](std::size_t size, void* ptr) noexcept; // (5) ## 戻り値 - (1), (2) : 確保した記憶域の先頭アドレスを指すポインタ([`operator new`](op_new.md)`(size)` の戻り値)。 - (3), (4) : 記憶域を確保できた場合、確保した記憶域の先頭アドレスを指すポインタ。確保できなかった場合、ヌルポインタ。 - - C++03 まで:[`operator new`](op_new.md)`(size, std::`[`nothrow`](nothrow_t.md)`)` の戻り値 + - C++98 まで:[`operator new`](op_new.md)`(size, std::`[`nothrow`](nothrow_t.md)`)` の戻り値 - C++11 から:`operator new[](size)` の戻り値。ただし、`std::`[`bad_alloc`](bad_alloc.md) 例外が送出された場合には、ヌルポインタ。 - (5) : 引数 `ptr` @@ -87,11 +87,11 @@ constexpr void* operator new[](std::size_t size, void* ptr) noexcept; // (5) - (1)と(2) の形式の `operator new[]` を呼び出すだけであれば、(`new` 式から間接的に呼ばれる場合も含めて)`new` ヘッダをインクルードする必要はない。 -- (3) の形式の挙動の C++03 までと C++11 からの差は、利用者が [`operator new`](op_new.md)、あるいは `operator new[]` を置き換えていない場合には顕在化しない。 - しかし、例えば利用者が (1) の形式のみを置き換えた場合、C++03 までは (3) の形式を呼び出しても置き換えられたバージョンは呼び出されずに、間接的に[`operator new`](op_new.md) の (3) の形式を呼び出す。 +- (3) の形式の挙動の C++98 までと C++11 からの差は、利用者が [`operator new`](op_new.md)、あるいは `operator new[]` を置き換えていない場合には顕在化しない。 + しかし、例えば利用者が (1) の形式のみを置き換えた場合、C++98 までは (3) の形式を呼び出しても置き換えられたバージョンは呼び出されずに、間接的に[`operator new`](op_new.md) の (3) の形式を呼び出す。 `new` 式と異なり、`delete` 式には配置構文が存在しないため、(3) の形式で確保した記憶域も通常の `delete` 式で解放する事になる(コンストラクタで例外が送出された場合を除く。[`operator delete[]`](op_delete[].md) も参照)。 - 従って、C++03 までの場合、(1) の形式を利用者提供の関数で置き換える場合は、(3) の形式も (1) の形式と同様の記憶域確保を行う利用者提供の関数で置き換えるべきである。その場合、C++11 の (3) の形式のように、(1) を呼び出した上で例外ハンドリングする方法が安全確実な方法である。 - なお、C++11 からは (3) の形式は (1) を呼び出すことになっているため、 (1) の形式のみを置き換えれば問題はないが、C++03 までのバージョンでも同様に動くようにするため、あるいは、標準ライブラリのバグで (3) の形式が (1) の形式を呼び出していない可能性もあるため、(3) の形式も提供した方が良いかもしれない。 + 従って、C++98 までの場合、(1) の形式を利用者提供の関数で置き換える場合は、(3) の形式も (1) の形式と同様の記憶域確保を行う利用者提供の関数で置き換えるべきである。その場合、C++11 の (3) の形式のように、(1) を呼び出した上で例外ハンドリングする方法が安全確実な方法である。 + なお、C++11 からは (3) の形式は (1) を呼び出すことになっているため、 (1) の形式のみを置き換えれば問題はないが、C++98 までのバージョンでも同様に動くようにするため、あるいは、標準ライブラリのバグで (3) の形式が (1) の形式を呼び出していない可能性もあるため、(3) の形式も提供した方が良いかもしれない。 - (5) の形式は、実質何もしていない。この形式は、記憶域を確保した上でそこに新たなオブジェクトを構築するのではなく、あらかじめ確保されている記憶域上に新たなオブジェクトを構築するのに用いられる。 しかし、配列版 `new` 式では、指定した配列が必要とする記憶域のサイズをあらかじめ予測することが極めて困難であるため(下記を参照)、配列版 `new` 式の配置形式は使用すべきではない。 diff --git a/reference/numeric/accumulate.md b/reference/numeric/accumulate.md index 77d5e02cc7..973f674bee 100644 --- a/reference/numeric/accumulate.md +++ b/reference/numeric/accumulate.md @@ -6,13 +6,13 @@ ```cpp namespace std { template - T accumulate(InputIterator first, InputIterator last, T init); // (1) C++03 + T accumulate(InputIterator first, InputIterator last, T init); // (1) C++98 template constexpr T accumulate(InputIterator first, InputIterator last, T init); // (1) C++20 template T accumulate(InputIterator first, InputIterator last, T init, - BinaryOperation binary_op); // (2) C++03 + BinaryOperation binary_op); // (2) C++98 template constexpr T accumulate(InputIterator first, InputIterator last, T init, BinaryOperation binary_op); // (2) C++20 @@ -31,7 +31,7 @@ namespace std { ## 要件 -- C++03まで : `binary_op`は副作用を起こしてはならない +- C++98まで : `binary_op`は副作用を起こしてはならない - C++11から : `binary_op`は、イテレータ範囲`[first, last]`の要素変更およびイテレータの無効化をしてはならない @@ -43,7 +43,7 @@ namespace std { ## 効果 - (1) : `binary_op`を`operator+`として (2) の効果を適用する - (2) : - - C++03 : `acc = init`、`[first, last)`の各イテレータを`i`とし、`acc = binary_op(acc, *i)`を範囲の全要素に対して適用し、その結果となる`acc`を返す + - C++98 : `acc = init`、`[first, last)`の各イテレータを`i`とし、`acc = binary_op(acc, *i)`を範囲の全要素に対して適用し、その結果となる`acc`を返す - C++20 : `acc = init`、`[first, last)`の各イテレータを`i`とし、`acc = binary_op(`[`std::move`](/reference/utility/move.md)`(acc), *i)`を範囲の全要素に対して適用し、その結果となる`acc`を返す diff --git a/reference/numeric/adjacent_difference.md b/reference/numeric/adjacent_difference.md index a54c51a17b..d3a9bcad96 100644 --- a/reference/numeric/adjacent_difference.md +++ b/reference/numeric/adjacent_difference.md @@ -9,7 +9,7 @@ namespace std { OutputIterator adjacent_difference(InputIterator first, InputIterator last, - OutputIterator result); // (1) C++03 + OutputIterator result); // (1) C++98 template constexpr OutputIterator adjacent_difference(InputIterator first, @@ -21,7 +21,7 @@ namespace std { adjacent_difference(InputIterator first, InputIterator last, OutputIterator result, - BinaryOperation binary_op); // (2) C++03 + BinaryOperation binary_op); // (2) C++98 template constexpr OutputIterator adjacent_difference(InputIterator first, @@ -58,7 +58,7 @@ namespace std { ## 要件 - (2) : - - C++03まで : 関数オブジェクト`binary_op`の呼び出しは、副作用を起こしてはならない + - C++98まで : 関数オブジェクト`binary_op`の呼び出しは、副作用を起こしてはならない - C++11から : 関数オブジェクト`binary_op`の呼び出しが、イテレータ範囲`[first, last]`およびイテレータ範囲`[result, result + (last - first)]`の要素変更、イテレータの無効化をしてはならない - (3), (4) : - イテレータ範囲`[first, last)`とイテレータ範囲`[result, result + (last - first))`は重なってはならない diff --git a/reference/numeric/inner_product.md b/reference/numeric/inner_product.md index 1631e9b95c..96265045df 100644 --- a/reference/numeric/inner_product.md +++ b/reference/numeric/inner_product.md @@ -9,7 +9,7 @@ namespace std { T inner_product(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, - T init); // (1) C++03 + T init); // (1) C++98 template constexpr T inner_product(InputIterator1 first1, @@ -24,7 +24,7 @@ namespace std { InputIterator2 first2, T init, BinaryOperation1 binary_op1, - BinaryOperation2 binary_op2); // (2) C++03 + BinaryOperation2 binary_op2); // (2) C++98 template constexpr T @@ -49,7 +49,7 @@ namespace std { ## 要件 -- C++03まで : `binary_op1`および`binary_op2`は、副作用を起こしてはならない +- C++98まで : `binary_op1`および`binary_op2`は、副作用を起こしてはならない - C++11から : `binary_op1`および`binary_op2`が、イテレータ範囲`[first1, last1]`とイテレータ範囲`[first2, first2 + (last1 - first2)]`の要素変更およびイテレータの無効化をしてはならない @@ -60,10 +60,10 @@ namespace std { ## 効果 - (1) : - - C++03 : `acc = init;`、イテレータ範囲`[first1, last1)`の各イテレータを`i`、イテレータ範囲`[first2, first2 + (last1 - first1))`の各イテレータを`j`として、`acc = acc + (*i) * (*j);` の演算を行い、`acc`を返す + - C++98 : `acc = init;`、イテレータ範囲`[first1, last1)`の各イテレータを`i`、イテレータ範囲`[first2, first2 + (last1 - first1))`の各イテレータを`j`として、`acc = acc + (*i) * (*j);` の演算を行い、`acc`を返す - C++20 : `acc = init;`、イテレータ範囲`[first1, last1)`の各イテレータを`i`、イテレータ範囲`[first2, first2 + (last1 - first1))`の各イテレータを`j`として、`acc =` [`std::move`](/reference/utility/move.md)`(acc) + (*i) * (*j);` の演算を行い、`acc`を返す - (2) : - - C++03 : `acc = init;`、イテレータ範囲`[first1, last1)`の各イテレータを`i`、イテレータ範囲`[first2, first2 + (last1 - first1))`の各イテレータを`j`として、`acc = binary_op1(acc, binary_op2((*i), (*j)));` の演算を行い、`acc`を返す + - C++98 : `acc = init;`、イテレータ範囲`[first1, last1)`の各イテレータを`i`、イテレータ範囲`[first2, first2 + (last1 - first1))`の各イテレータを`j`として、`acc = binary_op1(acc, binary_op2((*i), (*j)));` の演算を行い、`acc`を返す - C++20 : `acc = init;`、イテレータ範囲`[first1, last1)`の各イテレータを`i`、イテレータ範囲`[first2, first2 + (last1 - first1))`の各イテレータを`j`として、`acc = binary_op1(`[`std::move`](/reference/utility/move.md)`(acc), binary_op2((*i), (*j)));` の演算を行い、`acc`を返す diff --git a/reference/numeric/partial_sum.md b/reference/numeric/partial_sum.md index ff5c8ce26e..7e9a2baa2d 100644 --- a/reference/numeric/partial_sum.md +++ b/reference/numeric/partial_sum.md @@ -9,7 +9,7 @@ namespace std { OutputIterator partial_sum(InputIterator first, InputIterator last, - OutputIterator result); // (1) C++03 + OutputIterator result); // (1) C++98 template constexpr OutputIterator partial_sum(InputIterator first, @@ -21,7 +21,7 @@ namespace std { partial_sum(InputIterator first, InputIterator last, OutputIterator result, - BinaryOperation binary_op); // (2) C++03 + BinaryOperation binary_op); // (2) C++98 template constexpr OutputIterator partial_sum(InputIterator first, @@ -63,7 +63,7 @@ namespace std { ## 要件 -- C++03まで : `binary_op`を呼び出した結果として、いかなる副作用も起こしてはならない +- C++98まで : `binary_op`を呼び出した結果として、いかなる副作用も起こしてはならない - C++11から : `InputIterator`の値型は、`*first`の型から構築可能でなければならない - C++11から : `binary_op`の戻り値が、`InputIterator`の値型に変換可能でなければならない - C++11から : `binary_op`の戻り値が、`result`出力イテレータに書き込めなければならない @@ -73,7 +73,7 @@ namespace std { ## 効果 - (1) : `binary_op`を`operator+`として、(2)の演算を行う - (2) : 出力結果のイテレータ範囲`[result, result + (last - first))`には、以下が書き込まれる: - - C++03 : + - C++98 : ``` *firstが書き込まれる // (1) diff --git a/reference/ostream/basic_ostream/op_assign.md b/reference/ostream/basic_ostream/op_assign.md index 32ab5a19d2..e58615232a 100644 --- a/reference/ostream/basic_ostream/op_assign.md +++ b/reference/ostream/basic_ostream/op_assign.md @@ -31,7 +31,7 @@ protected: ## 備考 - [`rdbuf`](../../ios/basic_ios/rdbuf.md)`()` は交換されない。 -- コピー代入演算子は C++03 までは未宣言だったため、コピー代入を行おうとするとコンパイラがコピー代入演算子を自動生成しようとするが、基底クラスのコピー代入演算子 [`basic_ios`](../../ios/basic_ios.md)`::`[`operator=`](../../ios/basic_ios/op_assign.md)`()` が `private` であるため、エラーとなっていた。 +- コピー代入演算子は C++98 までは未宣言だったため、コピー代入を行おうとするとコンパイラがコピー代入演算子を自動生成しようとするが、基底クラスのコピー代入演算子 [`basic_ios`](../../ios/basic_ios.md)`::`[`operator=`](../../ios/basic_ios/op_assign.md)`()` が `private` であるため、エラーとなっていた。 (いずれにせよコピーすることはできないが、`delete` の方が誤ってコピーしようとした際のエラーメッセージが分かりやすいため、変更されている) diff --git a/reference/ostream/basic_ostream/op_constructor.md b/reference/ostream/basic_ostream/op_constructor.md index 60f90ff130..ed1d03d1ce 100644 --- a/reference/ostream/basic_ostream/op_constructor.md +++ b/reference/ostream/basic_ostream/op_constructor.md @@ -30,7 +30,7 @@ protected: ## 備考 -- コピーコンストラクタは C++03 までは未宣言だったため、コピー代入を行おうとするとコンパイラがコピーコンストラクタを自動生成しようとするが、基底クラスのコピーコンストラクタ [`basic_ios`](../../ios/basic_ios.md)`::`[`basic_ios`](../../ios/basic_ios/op_constructor.md)`()` が `private` であるため、エラーとなっていた。 +- コピーコンストラクタは C++98 までは未宣言だったため、コピー代入を行おうとするとコンパイラがコピーコンストラクタを自動生成しようとするが、基底クラスのコピーコンストラクタ [`basic_ios`](../../ios/basic_ios.md)`::`[`basic_ios`](../../ios/basic_ios/op_constructor.md)`()` が `private` であるため、エラーとなっていた。 (いずれにせよコピーすることはできないが、`delete` の方が誤ってコピーしようとした際のエラーメッセージが分かりやすいため、変更されている) diff --git a/reference/ostream/basic_ostream/op_ostream.md b/reference/ostream/basic_ostream/op_ostream.md index 4b1a6bad87..000d56a225 100644 --- a/reference/ostream/basic_ostream/op_ostream.md +++ b/reference/ostream/basic_ostream/op_ostream.md @@ -8,32 +8,32 @@ // マニピュレータの実行 // 3つとも関数へのポインタを引数に取る。 basic_ostream& - operator<<(basic_ostream& (*pf)(basic_ostream&)); // (1) C++03 + operator<<(basic_ostream& (*pf)(basic_ostream&)); // (1) C++98 basic_ostream& - operator<<(basic_ios& (*pf)(basic_ios&)); // (2) C++03 + operator<<(basic_ios& (*pf)(basic_ios&)); // (2) C++98 basic_ostream& - operator<<(ios_base& (*pf)(ios_base&)); // (3) C++03 + operator<<(ios_base& (*pf)(ios_base&)); // (3) C++98 // bool値・数値・ポインタの書式化出力 -basic_ostream& operator<<(bool n); // (4) C++03 -basic_ostream& operator<<(short n); // (5) C++03 -basic_ostream& operator<<(unsigned short n); // (6) C++03 -basic_ostream& operator<<(int n); // (7) C++03 -basic_ostream& operator<<(unsigned int n); // (8) C++03 -basic_ostream& operator<<(long n); // (9) C++03 -basic_ostream& operator<<(unsigned long n); // (10) C++03 +basic_ostream& operator<<(bool n); // (4) C++98 +basic_ostream& operator<<(short n); // (5) C++98 +basic_ostream& operator<<(unsigned short n); // (6) C++98 +basic_ostream& operator<<(int n); // (7) C++98 +basic_ostream& operator<<(unsigned int n); // (8) C++98 +basic_ostream& operator<<(long n); // (9) C++98 +basic_ostream& operator<<(unsigned long n); // (10) C++98 basic_ostream& operator<<(long long n); // (11) C++11 basic_ostream& operator<<(unsigned long long n); // (12) C++11 -basic_ostream& operator<<(float f); // (13) C++03 -basic_ostream& operator<<(double f); // (14) C++03 -basic_ostream& operator<<(long double f); // (15) C++03 +basic_ostream& operator<<(float f); // (13) C++98 +basic_ostream& operator<<(double f); // (14) C++98 +basic_ostream& operator<<(long double f); // (15) C++98 basic_ostream& operator<<(extended-floating-point-type f); // (16) C++23 -basic_ostream& operator<<(const void* p); // (17) C++03 +basic_ostream& operator<<(const void* p); // (17) C++98 basic_ostream& operator<<(const volatile void* val); // (18) C++23 basic_ostream& operator<<(nullptr_t); // (19) C++17 // ストリームバッファの非書式化出力 -basic_ostream& operator<<(basic_streambuf* sb); // (20) C++03 +basic_ostream& operator<<(basic_streambuf* sb); // (20) C++98 ``` * extended-floating-point-type[link /reference/stdfloat.md] diff --git a/reference/ostream/basic_ostream/op_ostream_free.md b/reference/ostream/basic_ostream/op_ostream_free.md index ec4e124500..e8ab842945 100644 --- a/reference/ostream/basic_ostream/op_ostream_free.md +++ b/reference/ostream/basic_ostream/op_ostream_free.md @@ -209,8 +209,8 @@ int main() cpprefjp ``` -なお、この例は C++03 でもコンパイル・実行可能だが、その場合は出力に謎の 16 進数が出力される。 -これは、C++03 では `"cpprefjp"` の出力の際に `operator<<(basic_ostream&, const char*)` ではなく `basic_ostream::operator<<(const void*)` が呼び出されるためである。 +なお、この例は C++98 でもコンパイル・実行可能だが、その場合は出力に謎の 16 進数が出力される。 +これは、C++98 では `"cpprefjp"` の出力の際に `operator<<(basic_ostream&, const char*)` ではなく `basic_ostream::operator<<(const void*)` が呼び出されるためである。 (`operator<<(basic_ostream&, const char*)` は左辺に `const` ではない参照を必要とするため `ofstream` の一時オブジェクトを受け取れないが、`basic_ostream::operator<<(const void*)` はメンバ関数であるため `ofstream` の一時オブジェクトに対しても呼び出す事が可能) diff --git a/reference/ostream/basic_ostream/sentry/op_bool.md b/reference/ostream/basic_ostream/sentry/op_bool.md index 37eabc001b..79f9632588 100644 --- a/reference/ostream/basic_ostream/sentry/op_bool.md +++ b/reference/ostream/basic_ostream/sentry/op_bool.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -operator bool() const; // C++03 まで +operator bool() const; // C++98 まで explicit operator bool() const; // C++11 から ``` diff --git a/reference/queue/priority_queue/empty.md b/reference/queue/priority_queue/empty.md index 86a5e1c4aa..a3b304347b 100644 --- a/reference/queue/priority_queue/empty.md +++ b/reference/queue/priority_queue/empty.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool empty() const; // (1) C++03 +bool empty() const; // (1) C++98 [[nodiscard]] bool empty() const; // (1) C++20 constexpr bool empty() const; // (1) C++26 ``` diff --git a/reference/queue/priority_queue/op_constructor.md b/reference/queue/priority_queue/op_constructor.md index 6f17f84b5f..a2d8c1e6be 100644 --- a/reference/queue/priority_queue/op_constructor.md +++ b/reference/queue/priority_queue/op_constructor.md @@ -7,7 +7,7 @@ ```cpp explicit priority_queue(const Compare& x = Compare(), - const Container& other = Container()); // (1) C++03 + const Container& other = Container()); // (1) C++98 explicit priority_queue(const Compare& x = Compare(), Container&& y = Container()); // (1) C++11 @@ -27,7 +27,7 @@ constexpr explicit priority_queue(const Compare& x, const Container& other); // (3) C++11 constexpr priority_queue(const Compare& x, const Container& other); // (3) C++26 -priority_queue(const priority_queue&); // (4) C++03 +priority_queue(const priority_queue&); // (4) C++98 priority_queue(const priority_queue&) = default; // (4) C++11 constexpr priority_queue(const priority_queue&) = default; // (4) C++26 @@ -35,7 +35,7 @@ template priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare(), - const Container& other = Container()); // (5) C++03 + const Container& other = Container()); // (5) C++98 template constexpr priority_queue(InputIterator first, @@ -186,7 +186,7 @@ constexpr ## 概要 - (1) : デフォルトコンストラクタ - - C++03 : 比較関数と元となるコンテナをコピーして構築する。 + - C++98 : 比較関数と元となるコンテナをコピーして構築する。 - C++11 : 比較関数をコピー、元となるコンテナをムーブして構築する。 - C++20 : (2)に委譲。 - (2) : 比較関数のコピーと元となるコンテナをデフォルト構築して構築するコンストラクタ。 @@ -215,7 +215,7 @@ constexpr ## 効果 - (1) : - - C++03 + - C++98 1. メンバ変数`comp`を`x`でコピー構築する。 2. メンバ変数`c`を`other`でコピー構築する。 3. [`make_heap`](/reference/algorithm/make_heap.md)`(c.begin(), c.end(), comp)`を呼び出す。 diff --git a/reference/queue/priority_queue/pop.md b/reference/queue/priority_queue/pop.md index 537bff6aff..1d7d5f93c5 100644 --- a/reference/queue/priority_queue/pop.md +++ b/reference/queue/priority_queue/pop.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void pop(); // (1) C++03 +void pop(); // (1) C++98 constexpr void pop(); // (1) C++26 ``` diff --git a/reference/queue/priority_queue/push.md b/reference/queue/priority_queue/push.md index 1f9bd3c58e..bfe2d5eb05 100644 --- a/reference/queue/priority_queue/push.md +++ b/reference/queue/priority_queue/push.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void push(const value_type& x); // (1) C++03 +void push(const value_type& x); // (1) C++98 constexpr void push(const value_type& x); // (1) C++26 void push(value_type&& x); // (2) C++11 diff --git a/reference/queue/priority_queue/size.md b/reference/queue/priority_queue/size.md index 0f56745d6b..f1d34dfba2 100644 --- a/reference/queue/priority_queue/size.md +++ b/reference/queue/priority_queue/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type size() const; // (1) C++03 +size_type size() const; // (1) C++98 constexpr size_type size() const; // (1) C++26 ``` diff --git a/reference/queue/priority_queue/top.md b/reference/queue/priority_queue/top.md index 2ebfcd5f12..e91ad77429 100644 --- a/reference/queue/priority_queue/top.md +++ b/reference/queue/priority_queue/top.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -const_reference top() const; // (1) C++03 +const_reference top() const; // (1) C++98 constexpr const_reference top() const; // (1) C++26 ``` diff --git a/reference/queue/queue/back.md b/reference/queue/queue/back.md index b0aba97bbe..d9df64d6c9 100644 --- a/reference/queue/queue/back.md +++ b/reference/queue/queue/back.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -value_type& back(); // (1) C++03 +value_type& back(); // (1) C++98 constexpr value_type& back(); // (1) C++26 -const value_type& back() const; // (2) C++03 +const value_type& back() const; // (2) C++98 constexpr const value_type& back() const; // (2) C++26 ``` diff --git a/reference/queue/queue/empty.md b/reference/queue/queue/empty.md index 99f40da9ec..eadeeb5e44 100644 --- a/reference/queue/queue/empty.md +++ b/reference/queue/queue/empty.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool empty() const; // (1) C++03 +bool empty() const; // (1) C++98 [[nodiscard]] bool empty() const; // (1) C++20 constexpr bool empty() const; // (1) C++26 ``` diff --git a/reference/queue/queue/front.md b/reference/queue/queue/front.md index 4d1a8be3e1..b7ac2a4bc3 100644 --- a/reference/queue/queue/front.md +++ b/reference/queue/queue/front.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -value_type& front(); // (1) C++03 +value_type& front(); // (1) C++98 constexpr value_type& front(); // (1) C++26 -const value_type& front() const; // (2) C++03 +const value_type& front() const; // (2) C++98 constexpr const value_type& front() const; // (2) C++26 ``` diff --git a/reference/queue/queue/op_constructor.md b/reference/queue/queue/op_constructor.md index df02c6c65e..51c3cb6cb0 100644 --- a/reference/queue/queue/op_constructor.md +++ b/reference/queue/queue/op_constructor.md @@ -5,8 +5,8 @@ * function[meta id-type] ```cpp -// C++03まで -explicit queue(const Container& other = Container()); // (1), (2) C++03 +// C++98まで +explicit queue(const Container& other = Container()); // (1), (2) C++98 // C++11以降 C++17まで explicit queue(const Container& other); // (2) C++11 diff --git a/reference/queue/queue/op_equal.md b/reference/queue/queue/op_equal.md index 072c93c4e3..9ec481c427 100644 --- a/reference/queue/queue/op_equal.md +++ b/reference/queue/queue/op_equal.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator==(const queue& x, const queue& y); // (1) C++03 + bool operator==(const queue& x, const queue& y); // (1) C++98 template constexpr bool operator==(const queue& x, const queue& y); // (1) C++26 } diff --git a/reference/queue/queue/op_greater.md b/reference/queue/queue/op_greater.md index 4b704ec338..8fa0aadb53 100644 --- a/reference/queue/queue/op_greater.md +++ b/reference/queue/queue/op_greater.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator>(const queue& x, const queue& y); // (1) C++03 + bool operator>(const queue& x, const queue& y); // (1) C++98 template constexpr bool operator>(const queue& x, const queue& y); // (1) C++26 } diff --git a/reference/queue/queue/op_greater_equal.md b/reference/queue/queue/op_greater_equal.md index c35cf8f6ae..7c2625b5b2 100644 --- a/reference/queue/queue/op_greater_equal.md +++ b/reference/queue/queue/op_greater_equal.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator>=(const queue& x, const queue& y); // (1) C++03 + bool operator>=(const queue& x, const queue& y); // (1) C++98 template constexpr bool operator>=(const queue& x, const queue& y); // (1) C++26 } diff --git a/reference/queue/queue/op_less.md b/reference/queue/queue/op_less.md index d39bdc132e..a0afc5fadc 100644 --- a/reference/queue/queue/op_less.md +++ b/reference/queue/queue/op_less.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator<(const queue& x, const queue& y); // (1) C++03 + bool operator<(const queue& x, const queue& y); // (1) C++98 template constexpr bool operator<(const queue& x, const queue& y); // (1) C++26 } diff --git a/reference/queue/queue/op_less_equal.md b/reference/queue/queue/op_less_equal.md index 6312605206..040771da57 100644 --- a/reference/queue/queue/op_less_equal.md +++ b/reference/queue/queue/op_less_equal.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator<=(const queue& x, const queue& y); // (1) C++03 + bool operator<=(const queue& x, const queue& y); // (1) C++98 template constexpr bool operator<=(const queue& x, const queue& y); // (1) C++26 } diff --git a/reference/queue/queue/op_not_equal.md b/reference/queue/queue/op_not_equal.md index 8427a9825d..26b1c83a97 100644 --- a/reference/queue/queue/op_not_equal.md +++ b/reference/queue/queue/op_not_equal.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator!=(const queue& x, const queue& y); // (1) C++03 + bool operator!=(const queue& x, const queue& y); // (1) C++98 template constexpr bool operator!=(const queue& x, const queue& y); // (1) C++26 } diff --git a/reference/queue/queue/pop.md b/reference/queue/queue/pop.md index 7ca1e8efaa..c1ecc931f3 100644 --- a/reference/queue/queue/pop.md +++ b/reference/queue/queue/pop.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void pop(); // (1) C++03 +void pop(); // (1) C++98 constexpr void pop(); // (1) C++26 ``` diff --git a/reference/queue/queue/push.md b/reference/queue/queue/push.md index 4dc3dcd087..33e7f0e2dd 100644 --- a/reference/queue/queue/push.md +++ b/reference/queue/queue/push.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void push(const value_type& x); // (1) C++03 +void push(const value_type& x); // (1) C++98 constexpr void push(const value_type& x); // (1) C++26 void push(value_type&& x); // (2) C++11 diff --git a/reference/queue/queue/size.md b/reference/queue/queue/size.md index e458b08a3d..d2343a28a1 100644 --- a/reference/queue/queue/size.md +++ b/reference/queue/queue/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type size() const; // (1) C++03 +size_type size() const; // (1) C++98 constexpr size_type size() const; // (1) C++26 ``` diff --git a/reference/set/multiset.md b/reference/set/multiset.md index 306693fe29..527b219eef 100644 --- a/reference/set/multiset.md +++ b/reference/set/multiset.md @@ -124,8 +124,8 @@ namespace std { | `const_iterator` | 読み取り専用双方向イテレータ。 | | | `size_type` | 要素数を表す符号なし整数型。`difference_type` で表現可能な非負整数(0以上の整数)を表すことが可能。(通常は [`size_t`](/reference/cstddef/size_t.md)) | | | `difference_type` | 同一のコンテナを指す `iterator` の差を表す符号付き整数型(通常は [`ptrdiff_t`](/reference/cstddef/ptrdiff_t.md))
`std::`[`iterator_traits`](/reference/iterator/iterator_traits.md)`::difference_type`、および、`std::`[`iterator_traits`](/reference/iterator/iterator_traits.md)`::difference_type` と同じ。 | | -| `pointer` | 要素 `value_type`へのポインタ。
C++03 : `typename Allocator::pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::pointer`。 | | -| `const_pointer` | 要素 `value_type`への`const`ポインタ。
C++03 : `typename Allocator::const_pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::const_pointer`。 | | +| `pointer` | 要素 `value_type`へのポインタ。
C++98 : `typename Allocator::pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::pointer`。 | | +| `const_pointer` | 要素 `value_type`への`const`ポインタ。
C++98 : `typename Allocator::const_pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::const_pointer`。 | | | `reverse_iterator` | 逆順双方向イテレータ。`std::`[`reverse_iterator`](/reference/iterator/reverse_iterator.md)``。 | | | `const_reverse_iterator` | 読み取り専用逆順双方向イテレータ。`std::`[`reverse_iterator`](/reference/iterator/reverse_iterator.md)``。 | | | `node_type` | [`node_handle`](/reference/node_handle/node_handle.md)クラステンプレートの特殊化。 | C++17 | diff --git a/reference/set/multiset/begin.md b/reference/set/multiset/begin.md index 724d49129f..48331e815e 100644 --- a/reference/set/multiset/begin.md +++ b/reference/set/multiset/begin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator begin(); // (1) C++03 +iterator begin(); // (1) C++98 iterator begin() noexcept; // (1) C++11 constexpr iterator begin() noexcept; // (1) C++26 -const_iterator begin() const; // (2) C++03 +const_iterator begin() const; // (2) C++98 const_iterator begin() const noexcept; // (2) C++11 constexpr const_iterator begin() const noexcept; // (2) C++26 ``` diff --git a/reference/set/multiset/clear.md b/reference/set/multiset/clear.md index f4d30308bd..cd19c51c01 100644 --- a/reference/set/multiset/clear.md +++ b/reference/set/multiset/clear.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void clear(); // (1) C++03 +void clear(); // (1) C++98 void clear() noexcept; // (1) C++11 constexpr void clear() noexcept; // (1) C++26 ``` diff --git a/reference/set/multiset/count.md b/reference/set/multiset/count.md index 45237a9e4c..d31e701577 100644 --- a/reference/set/multiset/count.md +++ b/reference/set/multiset/count.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type count(const key_type& x) const; // (1) C++03 +size_type count(const key_type& x) const; // (1) C++98 constexpr size_type count(const key_type& x) const; // (1) C++26 template diff --git a/reference/set/multiset/empty.md b/reference/set/multiset/empty.md index 8a2ea12251..949f5c8334 100644 --- a/reference/set/multiset/empty.md +++ b/reference/set/multiset/empty.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool empty() const; // (1) C++03 +bool empty() const; // (1) C++98 bool empty() const noexcept; // (1) C++11 [[nodiscard]] bool empty() const noexcept; // (1) C++20 constexpr bool empty() const noexcept; // (1) C++26 diff --git a/reference/set/multiset/end.md b/reference/set/multiset/end.md index 90e156ef28..1862a7fc56 100644 --- a/reference/set/multiset/end.md +++ b/reference/set/multiset/end.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator end(); // (1) C++03 +iterator end(); // (1) C++98 iterator end() noexcept; // (1) C++11 constexpr iterator end() noexcept; // (1) C++26 -const_iterator end() const; // (2) C++03 +const_iterator end() const; // (2) C++98 const_iterator end() const noexcept; // (2) C++11 constexpr const_iterator end() const noexcept; // (2) C++26 ``` diff --git a/reference/set/multiset/equal_range.md b/reference/set/multiset/equal_range.md index 6dd27ef0e7..2d6778684f 100644 --- a/reference/set/multiset/equal_range.md +++ b/reference/set/multiset/equal_range.md @@ -6,7 +6,7 @@ ```cpp pair - equal_range(const key_type& x); // (1) C++03 + equal_range(const key_type& x); // (1) C++98 constexpr pair equal_range(const key_type& x); // (1) C++26 @@ -18,7 +18,7 @@ constexpr pair equal_range(const K& x); // (2) C++26 pair - equal_range(const key_type& x) const; // (3) C++03 + equal_range(const key_type& x) const; // (3) C++98 constexpr pair equal_range(const key_type& x) const; // (3) C++26 diff --git a/reference/set/multiset/erase.md b/reference/set/multiset/erase.md index 0239232a98..f209661a01 100644 --- a/reference/set/multiset/erase.md +++ b/reference/set/multiset/erase.md @@ -5,14 +5,14 @@ * function[meta id-type] ```cpp -void erase(iterator position); // (1) C++03 (C++11で一旦削除) +void erase(iterator position); // (1) C++98 (C++11で一旦削除) iterator erase(iterator position); // (1) C++17 constexpr iterator erase(iterator position); // (1) C++26 iterator erase(const_iterator position); // (2) C++11 constexpr iterator erase(const_iterator position); // (2) C++26 -size_type erase(const key_type& x); // (3) C++03 +size_type erase(const key_type& x); // (3) C++98 constexpr size_type erase(const key_type& x); // (3) C++26 template @@ -20,7 +20,7 @@ size_type erase(K&& x); // (4) C++23 template constexpr size_type erase(K&& x); // (4) C++26 -void erase(iterator first, iterator last); // (5) C++03 +void erase(iterator first, iterator last); // (5) C++98 iterator erase(const_iterator first, const_iterator last); // (5) C++11 constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++26 ``` @@ -45,12 +45,12 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 ## 戻り値 - (1) : - - C++03 : 戻り値なし + - C++98 : 戻り値なし - C++17 : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) - (2) : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) - (3), (4) : 削除された要素の数を返す - (5) : - - C++03 : 戻り値なし + - C++98 : 戻り値なし - C++11 : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) @@ -64,7 +64,7 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 - (1) : C++17で再追加されたこのオーバーロードは、それ以前の言語バージョンから使用できる可能性がある - (1), (2) : この関数に、範囲外のイテレータ (終端イテレータを含む) を指定した場合の動作は未定義 - 削除された要素を指すイテレータ、および、参照のみ無効になる。なお、規格書に明確な記載は無いが、削除された要素を指すポインタも無効になる。 -- ループ中で `multiset` の要素を削除するためには、C++03 までは以下のようなコードを書く必要があった。 +- ループ中で `multiset` の要素を削除するためには、C++98 までは以下のようなコードを書く必要があった。 ```cpp while (it != set_object.end()) { if (条件) { @@ -89,7 +89,7 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 ## 例 -### 基本的な使い方 (C++03) +### 基本的な使い方 (C++98) ```cpp example #include #include @@ -138,7 +138,7 @@ int main() // 条件一致した要素を削除する if (*it == 1) { // 削除された要素の次を指すイテレータが返される。 - // C++03では、erase()の戻り値を使用せず、 c.erase(it++); のように書く + // C++98では、erase()の戻り値を使用せず、 c.erase(it++); のように書く it = c.erase(it); } // 要素削除をしない場合に、イテレータを進める diff --git a/reference/set/multiset/find.md b/reference/set/multiset/find.md index 78d8b28a2d..e3102cde00 100644 --- a/reference/set/multiset/find.md +++ b/reference/set/multiset/find.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator find(const key_type& x); // (1) C++03 +iterator find(const key_type& x); // (1) C++98 constexpr iterator find(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator find(const K& x); // (2) C++14 template constexpr iterator find(const K& x); // (2) C++26 -const_iterator find(const key_type& x) const; // (3) C++03 +const_iterator find(const key_type& x) const; // (3) C++98 constexpr const_iterator find(const key_type& x) const; // (3) C++26 template diff --git a/reference/set/multiset/get_allocator.md b/reference/set/multiset/get_allocator.md index 9d8b4f4a67..b40b340392 100644 --- a/reference/set/multiset/get_allocator.md +++ b/reference/set/multiset/get_allocator.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -allocator_type get_allocator() const; // (1) C++03 +allocator_type get_allocator() const; // (1) C++98 allocator_type get_allocator() const noexcept; // (1) C++11 constexpr allocator_type get_allocator() const noexcept; // (1) C++26 ``` @@ -57,7 +57,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 ### 処理系 diff --git a/reference/set/multiset/insert.md b/reference/set/multiset/insert.md index 0b3a64a8fa..e45b555364 100644 --- a/reference/set/multiset/insert.md +++ b/reference/set/multiset/insert.md @@ -5,13 +5,13 @@ * function[meta id-type] ```cpp -iterator insert(const value_type& x); // (1) C++03 +iterator insert(const value_type& x); // (1) C++98 constexpr iterator insert(const value_type& x); // (1) C++26 iterator insert(value_type&& y); // (2) C++11 constexpr iterator insert(value_type&& y); // (2) C++26 -iterator insert(iterator position, const value_type& x); // (3) C++03 +iterator insert(iterator position, const value_type& x); // (3) C++98 iterator insert(const_iterator position, const value_type& x); // (3) C++11 constexpr iterator insert(const_iterator position, const value_type& x); // (3) C++26 @@ -19,11 +19,11 @@ iterator insert(const_iterator position, value_type&& y); // (4) C++11 constexpr iterator insert(const_iterator position, value_type&& y); // (4) C++26 template -void insert(InputIterator first, InputIterator last); // (5) C++03 +void insert(InputIterator first, InputIterator last); // (5) C++98 template constexpr void insert(InputIterator first, InputIterator last); // (5) C++26 -void insert(initializer_list init); // (6) C++03 +void insert(initializer_list init); // (6) C++98 constexpr void insert(initializer_list init); // (6) C++26 iterator insert(node_type&& nh); // (7) C++17 diff --git a/reference/set/multiset/key_comp.md b/reference/set/multiset/key_comp.md index 77b244f615..66e6483c9b 100644 --- a/reference/set/multiset/key_comp.md +++ b/reference/set/multiset/key_comp.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -key_compare key_comp() const; // (1) C++03 +key_compare key_comp() const; // (1) C++98 constexpr key_compare key_comp() const; // (1) C++26 ``` diff --git a/reference/set/multiset/lower_bound.md b/reference/set/multiset/lower_bound.md index b20442781e..412562e799 100644 --- a/reference/set/multiset/lower_bound.md +++ b/reference/set/multiset/lower_bound.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator lower_bound(const key_type& x); // (1) C++03 +iterator lower_bound(const key_type& x); // (1) C++98 constexpr iterator lower_bound(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator lower_bound(const K& x); // (2) C++14 template constexpr iterator lower_bound(const K& x); // (2) C++26 -const_iterator lower_bound(const key_type& x) const; // (3) C++03 +const_iterator lower_bound(const key_type& x) const; // (3) C++98 constexpr const_iterator lower_bound(const key_type& x) const; // (3) C++26 template diff --git a/reference/set/multiset/max_size.md b/reference/set/multiset/max_size.md index 402180e38f..5137957b67 100644 --- a/reference/set/multiset/max_size.md +++ b/reference/set/multiset/max_size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type max_size() const; // (1) C++03 +size_type max_size() const; // (1) C++98 size_type max_size() const noexcept; // (1) C++11 constexpr size_type max_size() const noexcept; // (1) C++26 ``` diff --git a/reference/set/multiset/op_assign.md b/reference/set/multiset/op_assign.md index 14c7335d72..38b70558f6 100644 --- a/reference/set/multiset/op_assign.md +++ b/reference/set/multiset/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -multiset& operator=(const multiset& x); // (1) C++03 +multiset& operator=(const multiset& x); // (1) C++98 constexpr multiset& operator=(const multiset& x); // (1) C++26 multiset& operator=(multiset&& x); // (2) C++11 diff --git a/reference/set/multiset/op_constructor.md b/reference/set/multiset/op_constructor.md index 4bd0757ab4..1958f274f6 100644 --- a/reference/set/multiset/op_constructor.md +++ b/reference/set/multiset/op_constructor.md @@ -16,7 +16,7 @@ constexpr explicit const Allocator& = Allocator()); // (2) C++26 explicit multiset(const Compare& comp = Compare(), - const Allocator& alloc = Allocator()); // (1) + (2) C++03 + const Allocator& alloc = Allocator()); // (1) + (2) C++98 explicit multiset(const Allocator& alloc); // (3) C++11 constexpr explicit multiset(const Allocator& alloc); // (3) C++26 @@ -25,7 +25,7 @@ template multiset(InputIterator first, InputIterator last, const Compare& comp = Compare(), - const Allocator& alloc = Allocator()); // (4) C++03 + const Allocator& alloc = Allocator()); // (4) C++98 template constexpr multiset(InputIterator first, @@ -43,7 +43,7 @@ constexpr InputIterator last, const Allocator& a); // (5) C++26 -multiset(const set& x); // (6) C++03 +multiset(const set& x); // (6) C++98 constexpr multiset(const set& x); // (6) C++26 multiset(set&& y); // (7) C++11 diff --git a/reference/set/multiset/op_destructor.md b/reference/set/multiset/op_destructor.md index ad253220e7..276c217e1c 100644 --- a/reference/set/multiset/op_destructor.md +++ b/reference/set/multiset/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -~multiset(); // (1) C++03 +~multiset(); // (1) C++98 constexpr ~multiset(); // (1) C++26 ``` diff --git a/reference/set/multiset/op_equal.md b/reference/set/multiset/op_equal.md index 08e61d52b5..6a195893f5 100644 --- a/reference/set/multiset/op_equal.md +++ b/reference/set/multiset/op_equal.md @@ -8,7 +8,7 @@ namespace std { template bool operator==(const multiset& x, - const multiset& y); // (1) C++03 + const multiset& y); // (1) C++98 template constexpr bool operator==(const multiset& x, @@ -21,7 +21,7 @@ namespace std { ## 戻り値 -- C++03 : `x.`[`size`](size.md)`() == y.`[`size`](size.md)`() &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` +- C++98 : `x.`[`size`](size.md)`() == y.`[`size`](size.md)`() &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` - C++14 : [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`(), y.`[`end`](end.md)`());` diff --git a/reference/set/multiset/op_greater.md b/reference/set/multiset/op_greater.md index 72892c9105..2bd35112e7 100644 --- a/reference/set/multiset/op_greater.md +++ b/reference/set/multiset/op_greater.md @@ -9,7 +9,7 @@ namespace std { template bool operator>(const multiset& x, - const multiset& y); // (1) C++03 + const multiset& y); // (1) C++98 template constexpr bool operator>(const multiset& x, diff --git a/reference/set/multiset/op_greater_equal.md b/reference/set/multiset/op_greater_equal.md index 0c3a01313b..c474c45c09 100644 --- a/reference/set/multiset/op_greater_equal.md +++ b/reference/set/multiset/op_greater_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator>=(const multiset& x, - const multiset& y); // (1) C++03 + const multiset& y); // (1) C++98 template constexpr bool operator>=(const multiset& x, diff --git a/reference/set/multiset/op_less.md b/reference/set/multiset/op_less.md index a801e00965..0454192008 100644 --- a/reference/set/multiset/op_less.md +++ b/reference/set/multiset/op_less.md @@ -9,7 +9,7 @@ namespace std { template bool operator<(const multiset& x, - const multiset& y); // (1) C++03 + const multiset& y); // (1) C++98 template constexpr bool operator<(const multiset& x, diff --git a/reference/set/multiset/op_less_equal.md b/reference/set/multiset/op_less_equal.md index 66e2e4409d..264f40cee6 100644 --- a/reference/set/multiset/op_less_equal.md +++ b/reference/set/multiset/op_less_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator<=(const multiset& x, - const multiset& y); // (1) C++03 + const multiset& y); // (1) C++98 template constexpr bool operator<=(const multiset& x, diff --git a/reference/set/multiset/op_not_equal.md b/reference/set/multiset/op_not_equal.md index 061d79251f..f18ccb1362 100644 --- a/reference/set/multiset/op_not_equal.md +++ b/reference/set/multiset/op_not_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator!=(const multiset& x, - const multiset& y); // (1) C++03 + const multiset& y); // (1) C++98 template constexpr bool operator!=(const multiset& x, diff --git a/reference/set/multiset/rbegin.md b/reference/set/multiset/rbegin.md index 1d4eece4c6..987832807f 100644 --- a/reference/set/multiset/rbegin.md +++ b/reference/set/multiset/rbegin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rbegin(); // (1) C++03 +reverse_iterator rbegin(); // (1) C++98 reverse_iterator rbegin() noexcept; // (1) C++11 constexpr reverse_iterator rbegin() noexcept; // (1) C++26 -const_reverse_iterator rbegin() const; // (2) C++03 +const_reverse_iterator rbegin() const; // (2) C++98 const_reverse_iterator rbegin() const noexcept; // (2) C++11 constexpr const_reverse_iterator rbegin() const noexcept; // (2) C++26 ``` diff --git a/reference/set/multiset/rend.md b/reference/set/multiset/rend.md index 95f9e44656..5466c1230e 100644 --- a/reference/set/multiset/rend.md +++ b/reference/set/multiset/rend.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rend(); // (1) C++03 +reverse_iterator rend(); // (1) C++98 reverse_iterator rend() noexcept; // (1) C++11 constexpr reverse_iterator rend() noexcept; // (1) C++26 -const_reverse_iterator rend() const; // (2) C++03 +const_reverse_iterator rend() const; // (2) C++98 const_reverse_iterator rend() const noexcept; // (2) C++11 constexpr const_reverse_iterator rend() const noexcept; // (2) C++26 ``` diff --git a/reference/set/multiset/size.md b/reference/set/multiset/size.md index bfdc00eeb0..64bb2dfa46 100644 --- a/reference/set/multiset/size.md +++ b/reference/set/multiset/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type size() const; // (1) C++03 +size_type size() const; // (1) C++98 size_type size() const noexcept; // (1) C++11 constexpr size_type size() const noexcept; // (1) C++26 ``` diff --git a/reference/set/multiset/swap.md b/reference/set/multiset/swap.md index 50f640178d..ecf9c25c98 100644 --- a/reference/set/multiset/swap.md +++ b/reference/set/multiset/swap.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void swap(multiset& st); // (1) C++03 +void swap(multiset& st); // (1) C++98 void swap(multiset& x) noexcept(allocator_traits::is_always_equal::value && noexcept(swap(declval(),declval()))); // (1) C++17 diff --git a/reference/set/multiset/swap_free.md b/reference/set/multiset/swap_free.md index 67960d35bd..2e58877fea 100644 --- a/reference/set/multiset/swap_free.md +++ b/reference/set/multiset/swap_free.md @@ -8,7 +8,7 @@ namespace std { template void swap(multiset& x, - multiset& y); // (1) C++03 + multiset& y); // (1) C++98 template void swap(multiset& x, diff --git a/reference/set/multiset/upper_bound.md b/reference/set/multiset/upper_bound.md index 126295b2fe..5871da09d1 100644 --- a/reference/set/multiset/upper_bound.md +++ b/reference/set/multiset/upper_bound.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator upper_bound(const key_type& x); // (1) C++03 +iterator upper_bound(const key_type& x); // (1) C++98 constexpr iterator upper_bound(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator upper_bound(const K& x); // (2) C++14 template constexpr iterator upper_bound(const K& x); // (2) C++26 -const_iterator upper_bound(const key_type& x) const; // (3) C++03 +const_iterator upper_bound(const key_type& x) const; // (3) C++98 constexpr const_iterator upper_bound(const key_type& x) const; // (3) C++26 template diff --git a/reference/set/multiset/value_comp.md b/reference/set/multiset/value_comp.md index 0ed427bbfe..74414beccb 100644 --- a/reference/set/multiset/value_comp.md +++ b/reference/set/multiset/value_comp.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -value_compare value_comp() const; // (1) C++03 +value_compare value_comp() const; // (1) C++98 constexpr value_compare value_comp() const; // (1) C++26 ``` diff --git a/reference/set/set.md b/reference/set/set.md index c5792666b7..9f1b889549 100644 --- a/reference/set/set.md +++ b/reference/set/set.md @@ -125,8 +125,8 @@ namespace std { | `const_iterator` | 読み取り専用双方向イテレータ。 | | | `size_type` | 要素数を表す符号なし整数型。`difference_type` で表現可能な非負整数(0以上の整数)を表すことが可能。(通常は [`size_t`](/reference/cstddef/size_t.md)) | | | `difference_type` | 同一のコンテナを指す `iterator` の差を表す符号付き整数型(通常は [`ptrdiff_t`](/reference/cstddef/ptrdiff_t.md))
`std::`[`iterator_traits`](/reference/iterator/iterator_traits.md)`::difference_type`、および、`std::`[`iterator_traits`](/reference/iterator/iterator_traits.md)`::difference_type` と同じ。 | | -| `pointer` | 要素 `value_type`へのポインタ。
C++03 : `typename Allocator::pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::pointer`。 | | -| `const_pointer` | 要素 `value_type`への`const`ポインタ。
C++03 : `typename Allocator::const_pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::const_pointer`。 | | +| `pointer` | 要素 `value_type`へのポインタ。
C++98 : `typename Allocator::pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::pointer`。 | | +| `const_pointer` | 要素 `value_type`への`const`ポインタ。
C++98 : `typename Allocator::const_pointer`。
C++11以降 : `typename` [`allocator_traits`](/reference/memory/allocator_traits.md)`::const_pointer`。 | | | `reverse_iterator` | 逆順双方向イテレータ。`std::`[`reverse_iterator`](/reference/iterator/reverse_iterator.md)``。 | | | `const_reverse_iterator` | 読み取り専用逆順双方向イテレータ。`std::`[`reverse_iterator`](/reference/iterator/reverse_iterator.md)``。 | | | `node_type` | [`node_handle`](/reference/node_handle/node_handle.md)クラステンプレートの特殊化。 | C++17 | diff --git a/reference/set/set/begin.md b/reference/set/set/begin.md index 00adad9dc6..a78e4fd89f 100644 --- a/reference/set/set/begin.md +++ b/reference/set/set/begin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator begin(); // (1) C++03 +iterator begin(); // (1) C++98 iterator begin() noexcept; // (1) C++11 constexpr iterator begin() noexcept; // (1) C++26 -const_iterator begin() const; // (2) C++03 +const_iterator begin() const; // (2) C++98 const_iterator begin() const noexcept; // (2) C++11 constexpr const_iterator begin() const noexcept; // (2) C++26 ``` diff --git a/reference/set/set/clear.md b/reference/set/set/clear.md index 9f276afd1c..d2d22092cd 100644 --- a/reference/set/set/clear.md +++ b/reference/set/set/clear.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void clear(); // (1) C++03 +void clear(); // (1) C++98 void clear() noexcept; // (1) C++11 constexpr void clear() noexcept; // (1) C++26 ``` diff --git a/reference/set/set/count.md b/reference/set/set/count.md index f60cf4249b..57dbe72ff7 100644 --- a/reference/set/set/count.md +++ b/reference/set/set/count.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type count(const key_type& x) const; // (1) C++03 +size_type count(const key_type& x) const; // (1) C++98 constexpr size_type count(const key_type& x) const; // (1) C++26 template diff --git a/reference/set/set/empty.md b/reference/set/set/empty.md index 90b526f17d..c5f813499e 100644 --- a/reference/set/set/empty.md +++ b/reference/set/set/empty.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool empty() const; // (1) C++03 +bool empty() const; // (1) C++98 bool empty() const noexcept; // (1) C++11 [[nodiscard]] bool empty() const noexcept; // (1) C++20 constexpr bool empty() const noexcept; // (1) C++26 diff --git a/reference/set/set/end.md b/reference/set/set/end.md index 4c043cc186..679190d544 100644 --- a/reference/set/set/end.md +++ b/reference/set/set/end.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator end(); // (1) C++03 +iterator end(); // (1) C++98 iterator end() noexcept; // (1) C++11 constexpr iterator end() noexcept; // (1) C++26 -const_iterator end() const; // (2) C++03 +const_iterator end() const; // (2) C++98 const_iterator end() const noexcept; // (2) C++11 constexpr const_iterator end() const noexcept; // (2) C++26 ``` diff --git a/reference/set/set/equal_range.md b/reference/set/set/equal_range.md index 700dfecaef..e37b2293c1 100644 --- a/reference/set/set/equal_range.md +++ b/reference/set/set/equal_range.md @@ -6,7 +6,7 @@ ```cpp pair - equal_range(const key_type& x); // (1) C++03 + equal_range(const key_type& x); // (1) C++98 constexpr pair equal_range(const key_type& x); // (1) C++26 @@ -18,7 +18,7 @@ constexpr pair equal_range(const K& x); // (2) C++26 pair - equal_range(const key_type& x) const; // (3) C++03 + equal_range(const key_type& x) const; // (3) C++98 constexpr pair equal_range(const key_type& x) const; // (3) C++26 diff --git a/reference/set/set/erase.md b/reference/set/set/erase.md index 1091ac24f8..44e89a1b93 100644 --- a/reference/set/set/erase.md +++ b/reference/set/set/erase.md @@ -5,14 +5,14 @@ * function[meta id-type] ```cpp -void erase(iterator position); // (1) C++03 (C++11で一旦削除) +void erase(iterator position); // (1) C++98 (C++11で一旦削除) iterator erase(iterator position); // (1) C++17 constexpr iterator erase(iterator position); // (1) C++26 iterator erase(const_iterator position); // (2) C++11 constexpr iterator erase(const_iterator position); // (2) C++26 -size_type erase(const key_type& x); // (3) C++03 +size_type erase(const key_type& x); // (3) C++98 constexpr size_type erase(const key_type& x); // (3) C++26 template @@ -20,7 +20,7 @@ size_type erase(K&& x); // (4) C++23 template constexpr size_type erase(K&& x); // (4) C++26 -void erase(iterator first, iterator last); // (5) C++03 +void erase(iterator first, iterator last); // (5) C++98 iterator erase(const_iterator first, const_iterator last); // (5) C++11 constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++26 ``` @@ -45,12 +45,12 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 ## 戻り値 - (1) : - - C++03 : 戻り値なし + - C++98 : 戻り値なし - C++17 : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) - (2) : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) - (3), (4) : 削除された要素の数を返す - (5) : - - C++03 : 戻り値なし + - C++98 : 戻り値なし - C++11 : 削除された要素の次を指すイテレータを返す。そのような要素がない場合、[`end()`](end.md)を返す (要素を削除した結果としてコンテナが空になった場合) @@ -64,7 +64,7 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 - (1) : C++17で再追加されたこのオーバーロードは、それ以前の言語バージョンから使用できる可能性がある - (1), (2) : この関数に、範囲外のイテレータ (終端イテレータを含む) を指定した場合の動作は未定義 - 削除された要素を指すイテレータ、および、参照のみ無効になる。なお、規格書に明確な記載は無いが、削除された要素を指すポインタも無効になる。 -- ループ中で `set` の要素を削除するためには、C++03 までは以下のようなコードを書く必要があった。 +- ループ中で `set` の要素を削除するためには、C++98 までは以下のようなコードを書く必要があった。 ```cpp while (it != set_object.end()) { if (条件) { @@ -89,7 +89,7 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (5) C++2 ## 例 -### 基本的な使い方 (C++03) +### 基本的な使い方 (C++98) ```cpp example #include #include @@ -139,7 +139,7 @@ int main() // 条件一致した要素を削除する if (*it == 1) { // 削除された要素の次を指すイテレータが返される。 - // C++03では、erase()の戻り値を使用せず、 c.erase(it++); のように書く + // C++98では、erase()の戻り値を使用せず、 c.erase(it++); のように書く it = c.erase(it); } // 要素削除をしない場合に、イテレータを進める diff --git a/reference/set/set/find.md b/reference/set/set/find.md index 2f26041225..9ed6e120c4 100644 --- a/reference/set/set/find.md +++ b/reference/set/set/find.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator find(const key_type& x); // (1) C++03 +iterator find(const key_type& x); // (1) C++98 constexpr iterator find(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator find(const K& x); // (2) C++14 template constexpr iterator find(const K& x); // (2) C++26 -const_iterator find(const key_type& x) const; // (3) C++03 +const_iterator find(const key_type& x) const; // (3) C++98 constexpr const_iterator find(const key_type& x) const; // (3) C++26 template diff --git a/reference/set/set/get_allocator.md b/reference/set/set/get_allocator.md index 53294fac5f..50c4f3a403 100644 --- a/reference/set/set/get_allocator.md +++ b/reference/set/set/get_allocator.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -allocator_type get_allocator() const; // (1) C++03 +allocator_type get_allocator() const; // (1) C++98 allocator_type get_allocator() const noexcept; // (1) C++11 constexpr allocator_type get_allocator() const noexcept; // (1) C++26 ``` @@ -57,7 +57,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 ### 処理系 diff --git a/reference/set/set/insert.md b/reference/set/set/insert.md index d5a28d5375..6e92565840 100644 --- a/reference/set/set/insert.md +++ b/reference/set/set/insert.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -pair insert(const value_type& x); // (1) C++03 +pair insert(const value_type& x); // (1) C++98 constexpr pair insert(const value_type& x); // (1) C++26 pair insert(value_type&& y); // (2) C++11 @@ -14,7 +14,7 @@ constexpr pair insert(value_type&& y); // (2) C++26 template constexpr pair insert(K&& x); // (3) C++26 -iterator insert(iterator hint, const value_type& x); // (4) C++03 +iterator insert(iterator hint, const value_type& x); // (4) C++98 iterator insert(const_iterator hint, const value_type& x); // (4) C++11 constexpr iterator insert(const_iterator hint, const value_type& x); // (4) C++26 @@ -25,11 +25,11 @@ template constexpr iterator insert(const_iterator hint, K&& x); // (6) C++26 template -void insert(InputIterator first, InputIterator last); // (7) C++03 +void insert(InputIterator first, InputIterator last); // (7) C++98 template constexpr void insert(InputIterator first, InputIterator last); // (7) C++26 -void insert(initializer_list init); // (8) C++03 +void insert(initializer_list init); // (8) C++98 constexpr void insert(initializer_list init); // (8) C++26 insert_return_type insert(node_type&& nh); // (9) C++17 diff --git a/reference/set/set/key_comp.md b/reference/set/set/key_comp.md index e605de14d2..1c5c3090f2 100644 --- a/reference/set/set/key_comp.md +++ b/reference/set/set/key_comp.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -key_compare key_comp() const; // (1) C++03 +key_compare key_comp() const; // (1) C++98 constexpr key_compare key_comp() const; // (1) C++26 ``` diff --git a/reference/set/set/lower_bound.md b/reference/set/set/lower_bound.md index 75fad22b49..5ca2e0949e 100644 --- a/reference/set/set/lower_bound.md +++ b/reference/set/set/lower_bound.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator lower_bound(const key_type& x); // (1) C++03 +iterator lower_bound(const key_type& x); // (1) C++98 constexpr iterator lower_bound(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator lower_bound(const K& x); // (2) C++14 template constexpr iterator lower_bound(const K& x); // (2) C++26 -const_iterator lower_bound(const key_type& x) const; // (3) C++03 +const_iterator lower_bound(const key_type& x) const; // (3) C++98 constexpr const_iterator lower_bound(const key_type& x) const; // (3) C++26 template diff --git a/reference/set/set/max_size.md b/reference/set/set/max_size.md index 3e9f420fd1..62d17d6dfe 100644 --- a/reference/set/set/max_size.md +++ b/reference/set/set/max_size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type max_size() const; // (1) C++03 +size_type max_size() const; // (1) C++98 size_type max_size() const noexcept; // (1) C++11 constexpr size_type max_size() const noexcept; // (1) C++26 ``` diff --git a/reference/set/set/op_assign.md b/reference/set/set/op_assign.md index 6869c912ba..5e0437c80d 100644 --- a/reference/set/set/op_assign.md +++ b/reference/set/set/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -set& operator=(const set& x); // (1) C++03 +set& operator=(const set& x); // (1) C++98 constexpr set& operator=(const set& x); // (1) C++26 set& operator=(set&& x); // (2) C++11 diff --git a/reference/set/set/op_constructor.md b/reference/set/set/op_constructor.md index 16d8d4a60a..a658882216 100644 --- a/reference/set/set/op_constructor.md +++ b/reference/set/set/op_constructor.md @@ -16,7 +16,7 @@ constexpr explicit explicit set(const Compare& comp = Compare(), - const Allocator& alloc = Allocator()); // (1) + (2) C++03 + const Allocator& alloc = Allocator()); // (1) + (2) C++98 explicit set(const Allocator& alloc); // (3) C++11 constexpr explicit set(const Allocator& alloc); // (3) C++26 @@ -25,7 +25,7 @@ template set(InputIterator first, InputIterator last, const Compare& comp = Compare(), - const Allocator& alloc = Allocator()); // (4) C++03 + const Allocator& alloc = Allocator()); // (4) C++98 template constexpr set(InputIterator first, @@ -43,7 +43,7 @@ constexpr InputIterator last, const Allocator& a); // (5) C++26 -set(const set& x); // (6) C++03 +set(const set& x); // (6) C++98 constexpr set(const set& x); // (6) C++26 set(set&& y); // (7) C++11 diff --git a/reference/set/set/op_destructor.md b/reference/set/set/op_destructor.md index c0431472dd..ff1d8d8f58 100644 --- a/reference/set/set/op_destructor.md +++ b/reference/set/set/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -~set(); // (1) C++03 +~set(); // (1) C++98 constexpr ~set(); // (1) C++26 ``` diff --git a/reference/set/set/op_equal.md b/reference/set/set/op_equal.md index 1ff17f5601..fa584c715d 100644 --- a/reference/set/set/op_equal.md +++ b/reference/set/set/op_equal.md @@ -8,7 +8,7 @@ namespace std { template bool operator==(const set& x, - const set& y); // (1) C++03 + const set& y); // (1) C++98 template constexpr bool operator==(const set& x, @@ -21,7 +21,7 @@ namespace std { ## 戻り値 -- C++03 : `x.`[`size`](size.md)`() == y.`[`size`](size.md)`() &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` +- C++98 : `x.`[`size`](size.md)`() == y.`[`size`](size.md)`() &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` - C++14 : [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`(), y.`[`end`](end.md)`());` diff --git a/reference/set/set/op_greater.md b/reference/set/set/op_greater.md index edfc1a303e..aff8340e64 100644 --- a/reference/set/set/op_greater.md +++ b/reference/set/set/op_greater.md @@ -9,7 +9,7 @@ namespace std { template bool operator>(const set& x, - const set& y); // (1) C++03 + const set& y); // (1) C++98 template constexpr bool operator>(const set& x, diff --git a/reference/set/set/op_greater_equal.md b/reference/set/set/op_greater_equal.md index 5d6acc65d9..340504e283 100644 --- a/reference/set/set/op_greater_equal.md +++ b/reference/set/set/op_greater_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator>=(const set& x, - const set& y); // (1) C++03 + const set& y); // (1) C++98 template constexpr bool operator>=(const set& x, diff --git a/reference/set/set/op_less.md b/reference/set/set/op_less.md index a056976a09..09de6524f6 100644 --- a/reference/set/set/op_less.md +++ b/reference/set/set/op_less.md @@ -9,7 +9,7 @@ namespace std { template bool operator<(const set& x, - const set& y); // (1) C++03 + const set& y); // (1) C++98 template constexpr bool operator<(const set& x, diff --git a/reference/set/set/op_less_equal.md b/reference/set/set/op_less_equal.md index 388f0acfd2..3f89249e57 100644 --- a/reference/set/set/op_less_equal.md +++ b/reference/set/set/op_less_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator<=(const set& x, - const set& y); // (1) C++03 + const set& y); // (1) C++98 template constexpr bool operator<=(const set& x, diff --git a/reference/set/set/op_not_equal.md b/reference/set/set/op_not_equal.md index 3ad8c0ef09..e3a5567390 100644 --- a/reference/set/set/op_not_equal.md +++ b/reference/set/set/op_not_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator!=(const set& x, - const set& y); // (1) C++03 + const set& y); // (1) C++98 template constexpr bool operator!=(const set& x, diff --git a/reference/set/set/rbegin.md b/reference/set/set/rbegin.md index 5842141e06..093393f0a7 100644 --- a/reference/set/set/rbegin.md +++ b/reference/set/set/rbegin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rbegin(); // (1) C++03 +reverse_iterator rbegin(); // (1) C++98 reverse_iterator rbegin() noexcept; // (1) C++11 constexpr reverse_iterator rbegin() noexcept; // (1) C++26 -const_reverse_iterator rbegin() const; // (2) C++03 +const_reverse_iterator rbegin() const; // (2) C++98 const_reverse_iterator rbegin() const noexcept; // (2) C++11 constexpr const_reverse_iterator rbegin() const noexcept; // (2) C++26 ``` diff --git a/reference/set/set/rend.md b/reference/set/set/rend.md index 68be86fc2f..72aacd86ea 100644 --- a/reference/set/set/rend.md +++ b/reference/set/set/rend.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rend(); // (1) C++03 +reverse_iterator rend(); // (1) C++98 reverse_iterator rend() noexcept; // (1) C++11 constexpr reverse_iterator rend() noexcept; // (1) C++26 -const_reverse_iterator rend() const; // (2) C++03 +const_reverse_iterator rend() const; // (2) C++98 const_reverse_iterator rend() const noexcept; // (2) C++11 constexpr const_reverse_iterator rend() const noexcept; // (2) C++26 ``` diff --git a/reference/set/set/size.md b/reference/set/set/size.md index e46b73b866..091d8fb4f6 100644 --- a/reference/set/set/size.md +++ b/reference/set/set/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type size() const; // (1) C++03 +size_type size() const; // (1) C++98 size_type size() const noexcept; // (1) C++11 constexpr size_type size() const noexcept; // (1) C++26 ``` diff --git a/reference/set/set/swap.md b/reference/set/set/swap.md index 3ec8e6f912..a8019d2401 100644 --- a/reference/set/set/swap.md +++ b/reference/set/set/swap.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void swap(set& st); // (1) C++03 +void swap(set& st); // (1) C++98 void swap(set& x) noexcept(allocator_traits::is_always_equal::value && noexcept(swap(declval(),declval()))); // (1) C++17 diff --git a/reference/set/set/swap_free.md b/reference/set/set/swap_free.md index ad0d2263d6..684f2e0815 100644 --- a/reference/set/set/swap_free.md +++ b/reference/set/set/swap_free.md @@ -8,7 +8,7 @@ namespace std { template void swap(set& x, - set& y); // (1) C++03 + set& y); // (1) C++98 template void swap(set& x, diff --git a/reference/set/set/upper_bound.md b/reference/set/set/upper_bound.md index 8db12e7d5c..8b3b6ed60a 100644 --- a/reference/set/set/upper_bound.md +++ b/reference/set/set/upper_bound.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator upper_bound(const key_type& x); // (1) C++03 +iterator upper_bound(const key_type& x); // (1) C++98 constexpr iterator upper_bound(const key_type& x); // (1) C++26 template @@ -13,7 +13,7 @@ iterator upper_bound(const K& x); // (2) C++14 template constexpr iterator upper_bound(const K& x); // (2) C++26 -const_iterator upper_bound(const key_type& x) const; // (3) C++03 +const_iterator upper_bound(const key_type& x) const; // (3) C++98 constexpr const_iterator upper_bound(const key_type& x) const; // (3) C++26 template diff --git a/reference/set/set/value_comp.md b/reference/set/set/value_comp.md index 4ddf7ede20..1ef81c9204 100644 --- a/reference/set/set/value_comp.md +++ b/reference/set/set/value_comp.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -value_compare value_comp() const; // (1) C++03 +value_compare value_comp() const; // (1) C++98 constexpr value_compare value_comp() const; // (1) C++26 ``` diff --git a/reference/sstream/basic_istringstream/op_constructor.md b/reference/sstream/basic_istringstream/op_constructor.md index e58b6dcba3..3d09279a44 100644 --- a/reference/sstream/basic_istringstream/op_constructor.md +++ b/reference/sstream/basic_istringstream/op_constructor.md @@ -10,11 +10,11 @@ basic_istringstream() explicit basic_istringstream( ios_base::openmode which); // (2) C++11 explicit basic_istringstream( - ios_base::openmode which = ios_base::in); // (1)+(2) C++03 + ios_base::openmode which = ios_base::in); // (1)+(2) C++98 explicit basic_istringstream( const basic_string& s, - ios_base::openmode which = ios_base::in); // (2) C++03 + ios_base::openmode which = ios_base::in); // (2) C++98 explicit basic_istringstream( basic_string&& s, diff --git a/reference/sstream/basic_istringstream/str.md b/reference/sstream/basic_istringstream/str.md index 4b1457bda3..df134f142f 100644 --- a/reference/sstream/basic_istringstream/str.md +++ b/reference/sstream/basic_istringstream/str.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -basic_string str() const; // (1) C++03 +basic_string str() const; // (1) C++98 basic_string str() const &; // (1) C++20 template @@ -13,7 +13,7 @@ basic_string str(const SAlloc& sa) const &; // (2) C++20 basic_string str() const &&; // (3) C++20 -void str(const basic_string& s); // (4) C++03 +void str(const basic_string& s); // (4) C++98 template void str(const basic_string& s); // (5) C++20 diff --git a/reference/sstream/basic_ostringstream/op_constructor.md b/reference/sstream/basic_ostringstream/op_constructor.md index 2df5099fbe..61556ecf44 100644 --- a/reference/sstream/basic_ostringstream/op_constructor.md +++ b/reference/sstream/basic_ostringstream/op_constructor.md @@ -10,11 +10,11 @@ basic_ostringstream() explicit basic_ostringstream( ios_base::openmode which); // (2) C++11 explicit basic_ostringstream( - ios_base::openmode which = ios_base::out); // (1)+(2) C++03 + ios_base::openmode which = ios_base::out); // (1)+(2) C++98 explicit basic_ostringstream( const basic_string& s, - ios_base::openmode which = ios_base::out); // (2) C++03 + ios_base::openmode which = ios_base::out); // (2) C++98 explicit basic_ostringstream( basic_string&& s, diff --git a/reference/sstream/basic_ostringstream/str.md b/reference/sstream/basic_ostringstream/str.md index 4048586551..2365867ea4 100644 --- a/reference/sstream/basic_ostringstream/str.md +++ b/reference/sstream/basic_ostringstream/str.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -basic_string str() const; // (1) C++03 +basic_string str() const; // (1) C++98 basic_string str() const &; // (1) C++20 template @@ -13,7 +13,7 @@ basic_string str(const SAlloc& sa) const; // (2) C++20 basic_string str() &&; // (3) C++20 -void str(const basic_string& s); // (4) C++03 +void str(const basic_string& s); // (4) C++98 template void str(const basic_string& s); // (5) C++20 diff --git a/reference/sstream/basic_stringbuf/op_constructor.md b/reference/sstream/basic_stringbuf/op_constructor.md index 9dd0880d4e..b9f897d26d 100644 --- a/reference/sstream/basic_stringbuf/op_constructor.md +++ b/reference/sstream/basic_stringbuf/op_constructor.md @@ -10,11 +10,11 @@ basic_stringbuf() explicit basic_stringbuf( ios_base::openmode which); // (2) C++11 explicit basic_stringbuf( - ios_base::openmode which = ios_base::in | ios_base::out); // (1)+(2) C++03 + ios_base::openmode which = ios_base::in | ios_base::out); // (1)+(2) C++98 explicit basic_stringbuf( const basic_string& s, - ios_base::openmode which = ios_base::in | ios_base::out); // (3) C++03 + ios_base::openmode which = ios_base::in | ios_base::out); // (3) C++98 explicit basic_stringbuf( basic_string&& s, diff --git a/reference/sstream/basic_stringbuf/str.md b/reference/sstream/basic_stringbuf/str.md index 123681ef4a..15c3e99a87 100644 --- a/reference/sstream/basic_stringbuf/str.md +++ b/reference/sstream/basic_stringbuf/str.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -basic_string str() const; // (1) C++03 +basic_string str() const; // (1) C++98 basic_string str() const &; // (1) C++20 template @@ -13,7 +13,7 @@ basic_string str(const SAlloc& sa) const; // (2) C++20 basic_string str() &&; // (3) C++20 -void str(const basic_string& s); // (4) C++03 +void str(const basic_string& s); // (4) C++98 template void str(const basic_string& s); // (5) C++20 diff --git a/reference/sstream/basic_stringstream/op_constructor.md b/reference/sstream/basic_stringstream/op_constructor.md index ae5f1c85d2..8021aae7e7 100644 --- a/reference/sstream/basic_stringstream/op_constructor.md +++ b/reference/sstream/basic_stringstream/op_constructor.md @@ -10,11 +10,11 @@ basic_stringstream() explicit basic_stringstream( ios_base::openmode which); // (2) C++11 explicit basic_stringstream( - ios_base::openmode which = ios_base::in | ios_base::out); // (1)+(2) C++03 + ios_base::openmode which = ios_base::in | ios_base::out); // (1)+(2) C++98 explicit basic_stringstream( const basic_string& s, - ios_base::openmode which = ios_base::in | ios_base::out); // (3) C++03 + ios_base::openmode which = ios_base::in | ios_base::out); // (3) C++98 explicit basic_stringstream( basic_string&& s, diff --git a/reference/sstream/basic_stringstream/str.md b/reference/sstream/basic_stringstream/str.md index 2101234486..1c3f2b0e58 100644 --- a/reference/sstream/basic_stringstream/str.md +++ b/reference/sstream/basic_stringstream/str.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -basic_string str() const; // (1) C++03 +basic_string str() const; // (1) C++98 basic_string str() const &; // (1) C++20 template @@ -13,7 +13,7 @@ basic_string str(const SAlloc& sa) const &; // (2) C++20 basic_string str() const &&; // (3) C++20 -void str(const basic_string& s); // (4) C++03 +void str(const basic_string& s); // (4) C++98 template void str(const basic_string& s); // (5) C++20 diff --git a/reference/stack/stack/empty.md b/reference/stack/stack/empty.md index 009b3e53d9..6e4ee426a5 100644 --- a/reference/stack/stack/empty.md +++ b/reference/stack/stack/empty.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool empty() const; // (1) C++03 +bool empty() const; // (1) C++98 [[nodiscard]] bool empty() const; // (1) C++20 constexpr bool empty() const; // (1) C++26 ``` diff --git a/reference/stack/stack/op_assign.md b/reference/stack/stack/op_assign.md index be5dc457ae..76b80c39a5 100644 --- a/reference/stack/stack/op_assign.md +++ b/reference/stack/stack/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -stack& operator=(const stack& st); // (1) C++03 +stack& operator=(const stack& st); // (1) C++98 constexpr stack& operator=(const stack& st); // (1) C++26 stack& operator=(stack&& st); // (2) C++11 diff --git a/reference/stack/stack/op_constructor.md b/reference/stack/stack/op_constructor.md index 3b43a689e0..b002611209 100644 --- a/reference/stack/stack/op_constructor.md +++ b/reference/stack/stack/op_constructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -// C++03まで +// C++98まで explicit stack(const Container& cont = Container()); // (1), (2) // C++11以降 C++17まで diff --git a/reference/stack/stack/op_destructor.md b/reference/stack/stack/op_destructor.md index b6d84ae6a8..87d5aa5ca1 100644 --- a/reference/stack/stack/op_destructor.md +++ b/reference/stack/stack/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -~stack(); // (1) C++03 +~stack(); // (1) C++98 constexpr ~stack(); // (1) C++26 ``` diff --git a/reference/stack/stack/op_equal.md b/reference/stack/stack/op_equal.md index d4b8291324..5c56656055 100644 --- a/reference/stack/stack/op_equal.md +++ b/reference/stack/stack/op_equal.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator==(const stack& x, const stack& y); // (1) C++03 + bool operator==(const stack& x, const stack& y); // (1) C++98 template constexpr bool operator==(const stack& x, const stack& y); // (1) C++26 } diff --git a/reference/stack/stack/op_greater.md b/reference/stack/stack/op_greater.md index f3ed7e8282..ed3aeaa02e 100644 --- a/reference/stack/stack/op_greater.md +++ b/reference/stack/stack/op_greater.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator> (const stack& x, const stack& y); // (1) C++03 + bool operator> (const stack& x, const stack& y); // (1) C++98 template constexpr bool operator> (const stack& x, const stack& y); // (1) C++26 } diff --git a/reference/stack/stack/op_greater_equal.md b/reference/stack/stack/op_greater_equal.md index 45c28675ff..afb1ab2e55 100644 --- a/reference/stack/stack/op_greater_equal.md +++ b/reference/stack/stack/op_greater_equal.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator>=(const stack& x, const stack& y); // (1) C++03 + bool operator>=(const stack& x, const stack& y); // (1) C++98 template constexpr bool operator>=(const stack& x, const stack& y); // (1) C++26 } diff --git a/reference/stack/stack/op_less.md b/reference/stack/stack/op_less.md index ac1165547b..4fa7bf7335 100644 --- a/reference/stack/stack/op_less.md +++ b/reference/stack/stack/op_less.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator< (const stack& x, const stack& y); // (1) C++03 + bool operator< (const stack& x, const stack& y); // (1) C++98 template constexpr bool operator< (const stack& x, const stack& y); // (1) C++26 } diff --git a/reference/stack/stack/op_less_equal.md b/reference/stack/stack/op_less_equal.md index 0b70ff9653..1bcc63f02d 100644 --- a/reference/stack/stack/op_less_equal.md +++ b/reference/stack/stack/op_less_equal.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator<=(const stack& x, const stack& y); // (1) C++03 + bool operator<=(const stack& x, const stack& y); // (1) C++98 template constexpr bool operator<=(const stack& x, const stack& y); // (1) C++26 } diff --git a/reference/stack/stack/op_not_equal.md b/reference/stack/stack/op_not_equal.md index e1768421c5..b3fc64877a 100644 --- a/reference/stack/stack/op_not_equal.md +++ b/reference/stack/stack/op_not_equal.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator!=(const stack& x, const stack& y); // (1) C++03 + bool operator!=(const stack& x, const stack& y); // (1) C++98 template constexpr bool operator!=(const stack& x, const stack& y); // (1) C++26 } diff --git a/reference/stack/stack/pop.md b/reference/stack/stack/pop.md index 5b8a5fb975..64f9b5c0ad 100644 --- a/reference/stack/stack/pop.md +++ b/reference/stack/stack/pop.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void pop(); // (1) C++03 +void pop(); // (1) C++98 constexpr void pop(); // (1) C++26 ``` diff --git a/reference/stack/stack/push.md b/reference/stack/stack/push.md index 5a540916e0..9b22d700b0 100644 --- a/reference/stack/stack/push.md +++ b/reference/stack/stack/push.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void push(const value_type& x); // (1) C++03 +void push(const value_type& x); // (1) C++98 constexpr void push(const value_type& x); // (1) C++26 void push(value_type&& x); // (2) C++11 diff --git a/reference/stack/stack/size.md b/reference/stack/stack/size.md index 12de0ea4f9..f963d63089 100644 --- a/reference/stack/stack/size.md +++ b/reference/stack/stack/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type size() const; // (1) C++03 +size_type size() const; // (1) C++98 constexpr size_type size() const; // (1) C++26 ``` diff --git a/reference/stack/stack/top.md b/reference/stack/stack/top.md index 685050e1d0..4f14365233 100644 --- a/reference/stack/stack/top.md +++ b/reference/stack/stack/top.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -reference top(); // (1) C++03 +reference top(); // (1) C++98 constexpr reference top(); // (1) C++26 -const_reference top() const; // (2) C++03 +const_reference top() const; // (2) C++98 constexpr const_reference top() const; // (2) C++26 ``` diff --git a/reference/stdexcept.md b/reference/stdexcept.md index 5d5caccd65..87297e0209 100644 --- a/reference/stdexcept.md +++ b/reference/stdexcept.md @@ -44,9 +44,9 @@ | 名前 | 説明 | 対応バージョン | |--------------------|--------------------------------------------|-------| -| `explicit T(const` [`string`](/reference/string/basic_string.md)`& what_arg); // C++03`
`constexpr explicit T(const` [`string`](/reference/string/basic_string.md)`& what_arg); // C++26` | 指定したメッセージを持つ例外オブジェクトを生成する | | +| `explicit T(const` [`string`](/reference/string/basic_string.md)`& what_arg); // C++98`
`constexpr explicit T(const` [`string`](/reference/string/basic_string.md)`& what_arg); // C++26` | 指定したメッセージを持つ例外オブジェクトを生成する | | | `explicit T(const char* what_arg); // C++11`
`constexpr explicit T(const char* what_arg); // C++26` | 指定したメッセージを持つ例外オブジェクトを生成する | C++11 | -| `virtual const char* what() const noexcept; // C++03`
`constexpr virtual const char* what() const noexcept; // C++26` | メッセージを取得する | | +| `virtual const char* what() const noexcept; // C++98`
`constexpr virtual const char* what() const noexcept; // C++26` | メッセージを取得する | | ## 例 diff --git a/reference/string/basic_string.md b/reference/string/basic_string.md index c116a2a003..8e109c7fb7 100644 --- a/reference/string/basic_string.md +++ b/reference/string/basic_string.md @@ -64,7 +64,7 @@ namespace std { ## 適格要件 - C++17 : `traits::char_type`が`charT`と同じ型であること - - C++03からC++14までは、要件ではなく注記として述べられていた + - C++98からC++14までは、要件ではなく注記として述べられていた ## メンバ関数 @@ -170,7 +170,7 @@ namespace std { | 名前 | 説明 | 対応バージョン | |---------------------|----------------|------| | `traits_type` | 文字特性型 `traits` | | -| `value_type` | 文字型
C++03 : `traits::char_type`
C++17 : `charT` | | +| `value_type` | 文字型
C++98 : `traits::char_type`
C++17 : `charT` | | | `allocator_type` | アロケータ型 `Allocator` | | | `size_type` | 要素数を表す符号なし整数型。
`allocator_traits::size_type` | | | `difference_type` | イテレータの差を表す符号付き整数型。 `allocator_traits::difference_type` | | @@ -250,7 +250,7 @@ namespace std { ## 例 -### 基本的な使い方 (C++03) +### 基本的な使い方 (C++98) ```cpp example #include #include diff --git a/reference/string/basic_string/append.md b/reference/string/basic_string/append.md index 42c38bc960..09d6c00d0b 100644 --- a/reference/string/basic_string/append.md +++ b/reference/string/basic_string/append.md @@ -5,13 +5,13 @@ * function[meta id-type] ```cpp -basic_string& append(const basic_string& str); // (1) C++03 +basic_string& append(const basic_string& str); // (1) C++98 constexpr basic_string& append(const basic_string& str); // (1) C++20 basic_string& append(const basic_string& str, size_type pos, - size_type n); // (2) C++03 + size_type n); // (2) C++98 basic_string& append(const basic_string& str, size_type pos, @@ -21,19 +21,19 @@ constexpr basic_string& size_type pos, size_type n = npos); // (2) C++20 -basic_string& append(const charT* s, size_type n); // (3) C++03 +basic_string& append(const charT* s, size_type n); // (3) C++98 constexpr basic_string& append(const charT* s, size_type n); // (3) C++20 -basic_string& append(const charT* s); // (4) C++03 +basic_string& append(const charT* s); // (4) C++98 constexpr basic_string& append(const charT* s); // (4) C++20 -basic_string& append(size_type n, charT c); // (5) C++03 +basic_string& append(size_type n, charT c); // (5) C++98 constexpr basic_string& append(size_type n, charT c); // (5) C++20 template basic_string& append(InputIterator first, - InputIterator last); // (6) C++03 + InputIterator last); // (6) C++98 template constexpr basic_string& append(InputIterator first, @@ -86,20 +86,20 @@ constexpr basic_string& ## 効果 - (1) 対象オブジェクトの末尾に `str` の値が追加(コピー)される。 - * C++03 まで:`append(str, 0, npos)` と等価。 + * C++98 まで:`append(str, 0, npos)` と等価。 * C++11 から:`append(str.`[`data`](data.md)`(), str.`[`size`](size.md)`())` と等価。 - (2) 対象オブジェクトの末尾に `str` の `pos` 以降の文字が追加される。 追加される文字列の長さ `rlen` は、`n` と `str.`[`size`](size.md)`() - pos` の小さい方である。 `n == npos` の場合は、 `str.`[`size`](size.md)`() - pos` が使用される。 - * C++03 まで:対象オブジェクトの末尾に `str` の `pos` 番目からの `rlen` 文字を追加(コピー)する。 + * C++98 まで:対象オブジェクトの末尾に `str` の `pos` 番目からの `rlen` 文字を追加(コピー)する。 * C++11 から:`append(str.`[`data`](data.md)`() + pos, rlen)` と等価。 - (3) 対象オブジェクトの末尾に `s` が指す長さ `n` の文字列が追加(コピー)される。 - * C++03 まで:`append(`[`basic_string`](op_constructor.md)`(s, n))` と等価。 + * C++98 まで:`append(`[`basic_string`](op_constructor.md)`(s, n))` と等価。 * C++11 から:対象オブジェクトの末尾に `s` からの `n` 文字を追加(コピー)する。 - (4) 対象オブジェクトの末尾に `s` が指す NULL 終端された文字列が追加(コピー)される。 - * C++03 まで:`append(`[`basic_string`](op_constructor.md)`(s))` と等価。 + * C++98 まで:`append(`[`basic_string`](op_constructor.md)`(s))` と等価。 * C++11 から:`append(s, traits_type::length(s))` と等価。 - (5) 対象オブジェクトの末尾に、文字 `c` が `n` 文字追加(コピー)される。 @@ -140,23 +140,23 @@ constexpr basic_string& ## 例外 -- (1) C++03 まで:[`size`](size.md)`() >= npos - str.`[`size`](size.md)`()` の場合、`length_error` が送出される。 +- (1) C++98 まで:[`size`](size.md)`() >= npos - str.`[`size`](size.md)`()` の場合、`length_error` が送出される。 C++11 から:[`size`](size.md)`() + str.`[`size`](size.md)`() >` [`max_size`](max_size.md)`()` の場合、`length_error` が送出される。 - (2) `pos > str.`[`size`](size.md)`()` の場合、`out_of_range` が送出される。 - C++03 まで:[`size`](size.md)`() >= npos - rlen` の場合、`length_error` が送出される。 + C++98 まで:[`size`](size.md)`() >= npos - rlen` の場合、`length_error` が送出される。 C++11 から:[`size`](size.md)`() + rlen >` [`max_size`](max_size.md)`()` の場合、`length_error` が送出される。 -- (3) C++03 まで:[`size`](size.md)`() >= npos - n` の場合、`length_error` が送出される。 +- (3) C++98 まで:[`size`](size.md)`() >= npos - n` の場合、`length_error` が送出される。 C++11 から:[`size`](size.md)`() + n >` [`max_size`](max_size.md)`()` の場合、`length_error` が送出される。 -- (4) C++03 まで:[`size`](size.md)`() >= npos - traits::length(s)` の場合、`length_error` が送出される。 +- (4) C++98 まで:[`size`](size.md)`() >= npos - traits::length(s)` の場合、`length_error` が送出される。 C++11 から:[`size`](size.md)`() + traits::length(s) >` [`max_size`](max_size.md)`()` の場合、`length_error` が送出される。 -- (5) C++03 まで:[`size`](size.md)`() >= npos - n` の場合、`length_error` が送出される。 +- (5) C++98 まで:[`size`](size.md)`() >= npos - n` の場合、`length_error` が送出される。 C++11 から:[`size`](size.md)`() + n >` [`max_size`](max_size.md)`()` の場合、`length_error` が送出される。 -- (6) C++03 まで:[`size`](size.md)`() >= npos -` [`distance`](/reference/iterator/distance.md)`(first, last)` の場合、`length_error` が送出される。 +- (6) C++98 まで:[`size`](size.md)`() >= npos -` [`distance`](/reference/iterator/distance.md)`(first, last)` の場合、`length_error` が送出される。 C++11 から:[`size`](size.md)`() +` [`distance`](/reference/iterator/distance.md)`(first, last) >` [`max_size`](max_size.md)`()` の場合、`length_error` が送出される。 - (7) [`size`](size.md)`() + il.`[`size`](/reference/initializer_list/initializer_list/size.md)`() >` [`max_size`](max_size.md)`()` の場合、`length_error` が送出される。 diff --git a/reference/string/basic_string/assign.md b/reference/string/basic_string/assign.md index a140311fe8..da2438bc89 100644 --- a/reference/string/basic_string/assign.md +++ b/reference/string/basic_string/assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -basic_string& assign(const basic_string& str); // (1) C++03 +basic_string& assign(const basic_string& str); // (1) C++98 constexpr basic_string& assign(const basic_string& str); // (1) C++20 basic_string& assign(basic_string&& str) noexcept; // (2) C++11 @@ -14,7 +14,7 @@ constexpr basic_string& assign(basic_string&& str) noexcept; // (2) C++20 basic_string& assign(const basic_string& str, size_type pos, - size_type n); // (3) C++03 + size_type n); // (3) C++98 basic_string& assign(const basic_string& str, size_type pos, @@ -24,19 +24,19 @@ constexpr basic_string& size_type pos, size_type n = npos); // (3) C++20 -basic_string& assign(const charT* s, size_type n); // (4) C++03 +basic_string& assign(const charT* s, size_type n); // (4) C++98 constexpr basic_string& assign(const charT* s, size_type n); // (4) C++20 -basic_string& assign(const charT* s); // (5) C++03 +basic_string& assign(const charT* s); // (5) C++98 constexpr basic_string& assign(const charT* s); // (5) C++20 -basic_string& assign(size_type n, charT c); // (6) C++03 +basic_string& assign(size_type n, charT c); // (6) C++98 constexpr basic_string& assign(size_type n, charT c); // (6) C++20 template basic_string& assign(InputIterator first, - InputIterator last); // (7) C++03 + InputIterator last); // (7) C++98 template constexpr basic_string& assign(InputIterator first, @@ -88,7 +88,7 @@ constexpr basic_string& ## 効果 - (1) : コピー代入。`str`オブジェクトと同じ文字列を構築する。 - - C++03 : `assign(str, 0, npos)`と等価 + - C++98 : `assign(str, 0, npos)`と等価 - C++17 : `*this = str`と等価 - アロケータの伝播(`propagate_on_container_copy_assignment`)について、コピー代入演算子と一貫した扱いとなる - (2) : ムーブ代入。`str`オブジェクトが指すデータの所有権を自身に移動する。`str`は未規定の値になる。 diff --git a/reference/string/basic_string/at.md b/reference/string/basic_string/at.md index 0bac62647d..31252473e4 100644 --- a/reference/string/basic_string/at.md +++ b/reference/string/basic_string/at.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -const_reference at(size_type pos) const; // (1) C++03 +const_reference at(size_type pos) const; // (1) C++98 constexpr const_reference at(size_type pos) const; // (1) C++20 -reference at(size_type pos); // (2) C++03 +reference at(size_type pos); // (2) C++98 constexpr reference at(size_type pos); // (2) C++20 ``` diff --git a/reference/string/basic_string/begin.md b/reference/string/basic_string/begin.md index 1cfb948761..3e41576b2b 100644 --- a/reference/string/basic_string/begin.md +++ b/reference/string/basic_string/begin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator begin(); // (1) C++03 +iterator begin(); // (1) C++98 iterator begin() noexcept; // (1) C++11 constexpr iterator begin() noexcept; // (1) C++20 -const_iterator begin() const; // (2) C++03 +const_iterator begin() const; // (2) C++98 const_iterator begin() const noexcept; // (2) C++11 constexpr const_iterator begin() const noexcept; // (2) C++20 ``` diff --git a/reference/string/basic_string/c_str.md b/reference/string/basic_string/c_str.md index 18bcb2b194..2303686577 100644 --- a/reference/string/basic_string/c_str.md +++ b/reference/string/basic_string/c_str.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -const charT* c_str() const; // (1) C++03 +const charT* c_str() const; // (1) C++98 const charT* c_str() const noexcept; // (1) C++11 constexpr const charT* c_str() const noexcept; // (1) C++20 ``` @@ -19,12 +19,12 @@ C 言語で使用されている文字列表現である、NULL(つまり `cha ## 例外 -- C++03 まで:規定なし +- C++98 まで:規定なし - C++11 から:投げない ## 計算量 -- C++03 まで:規定なし +- C++98 まで:規定なし - C++11 から:定数時間 @@ -32,11 +32,11 @@ C 言語で使用されている文字列表現である、NULL(つまり `cha - 本メンバ関数で返されたポインタが指す配列の値を変更してはいけない。 - 本メンバ関数の呼び出しによる、対象オブジェクトの要素への既存の参照、ポインタ、イテレータの有効性への影響は以下の通りである。 - * C++03 まで:本メンバ関数を呼び出すと、対象オブジェクトの要素への既存の参照、ポインタ、イテレータは無効になる可能性がある。 + * C++98 まで:本メンバ関数を呼び出すと、対象オブジェクトの要素への既存の参照、ポインタ、イテレータは無効になる可能性がある。 * C++11 から:本メンバ関数を呼び出しても、対象オブジェクトの要素への既存の参照、ポインタ、イテレータは無効にはならない。 - 本メンバ関数で返されたポインタは、以下のような操作により無効になる可能性がある。 - * C++03 まで:対象オブジェクトに対する非コンストメンバ関数呼び出し + * C++98 まで:対象オブジェクトに対する非コンストメンバ関数呼び出し なお、規格書に記載はないものの、[`basic_string`](/reference/string/basic_string.md) への非コンスト参照を引数に取る標準ライブラリ関数を、対象オブジェクトを渡して呼び出した場合にも、無効になるものと思われる * C++11 から:対象オブジェクトに対する [`operator[]`](op_at.md)、[`at`](at.md)、[`front`](front.md)、[`back`](back.md)、[`begin`](begin.md)、[`rbegin`](rbegin.md)、[`end`](end.md)、[`rend`](rend.md) 以外の非コンストメンバ関数呼び出し、あるいは、[`basic_string`](/reference/string/basic_string.md) への非コンスト参照を引数に取る標準ライブラリ関数の、対象オブジェクトを渡しての呼び出し @@ -45,7 +45,7 @@ C 言語で使用されている文字列表現である、NULL(つまり `cha - 対象オブジェクト内に NULL 文字があった場合、C 言語の文字列表現では正しく扱うことができないので注意すること。 -- [`data`](data.md) は、C++03 までは NULL で終端されていない文字配列へのポインタを返していたが、C++11 からは本メンバ関数と全く同じものとなった。 +- [`data`](data.md) は、C++98 までは NULL で終端されていない文字配列へのポインタを返していたが、C++11 からは本メンバ関数と全く同じものとなった。 ## 例 diff --git a/reference/string/basic_string/capacity.md b/reference/string/basic_string/capacity.md index 02722e6505..dc71e72608 100644 --- a/reference/string/basic_string/capacity.md +++ b/reference/string/basic_string/capacity.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type capacity() const; // (1) C++03 +size_type capacity() const; // (1) C++98 size_type capacity() const noexcept; // (1) C++11 constexpr size_type capacity() const noexcept; // (1) C++20 ``` diff --git a/reference/string/basic_string/clear.md b/reference/string/basic_string/clear.md index adcdc5be69..f87a14aa15 100644 --- a/reference/string/basic_string/clear.md +++ b/reference/string/basic_string/clear.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void clear(); // (1) C++03 +void clear(); // (1) C++98 void clear() noexcept; // (1) C++11 constexpr void clear() noexcept; // (1) C++20 ``` diff --git a/reference/string/basic_string/compare.md b/reference/string/basic_string/compare.md index 7575e9a861..69462f5cae 100644 --- a/reference/string/basic_string/compare.md +++ b/reference/string/basic_string/compare.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -int compare(const basic_string& str) const; // (1) C++03 +int compare(const basic_string& str) const; // (1) C++98 int compare(const basic_string& str) const noexcept; // (1) C++11 constexpr int compare(const basic_string& str) const noexcept; // (1) C++20 @@ -13,7 +13,7 @@ constexpr int int compare(size_type pos1, size_type n1, - const basic_string& str) const; // (2) C++03 + const basic_string& str) const; // (2) C++98 constexpr int compare(size_type pos1, size_type n1, @@ -24,7 +24,7 @@ int size_type n1, const basic_string& str, size_type pos2, - size_type n2) const; // (3) C++03 + size_type n2) const; // (3) C++98 int compare(size_type pos1, size_type n1, @@ -38,13 +38,13 @@ constexpr int size_type pos2, size_type n2 = npos) const; // (3) C++20 -int compare(const charT* s) const; // (4) C++03 +int compare(const charT* s) const; // (4) C++98 constexpr int compare(const charT* s) const; // (4) C++20 int compare(size_type pos1, size_type n1, - const charT* s) const; // (5) C++03 + const charT* s) const; // (5) C++98 constexpr int compare(size_type pos1, size_type n1, @@ -54,7 +54,7 @@ int compare(size_type pos1, size_type n1, const charT* s, - size_type n2) const; // (6) C++03 + size_type n2) const; // (6) C++98 constexpr int compare(size_type pos1, size_type n1, diff --git a/reference/string/basic_string/copy.md b/reference/string/basic_string/copy.md index 8290b724bf..f78bfed314 100644 --- a/reference/string/basic_string/copy.md +++ b/reference/string/basic_string/copy.md @@ -6,7 +6,7 @@ ```cpp size_type - copy(charT* s, size_type n, size_type pos = 0) const; // (1) C++03 + copy(charT* s, size_type n, size_type pos = 0) const; // (1) C++98 constexpr size_type copy(charT* s, size_type n, size_type pos = 0) const; // (1) C++20 ``` diff --git a/reference/string/basic_string/data.md b/reference/string/basic_string/data.md index f13c3cd140..76e3653cb7 100644 --- a/reference/string/basic_string/data.md +++ b/reference/string/basic_string/data.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -const charT* data() const; // (1) C++03 +const charT* data() const; // (1) C++98 const charT* data() const noexcept; // (1) C++11 constexpr const charT* data() const noexcept; // (1) C++20 @@ -22,7 +22,7 @@ constexpr charT* data() noexcept; // (2) C++20 ## 戻り値 - (1) : - - C++03 : 文字配列の先頭へのポインタを返す。ただし、NULLで終端はされない + - C++98 : 文字配列の先頭へのポインタを返す。ただし、NULLで終端はされない - C++11 : C 言語で使用されている文字列表現である、NULL(つまり `charT()`)で終端された文字配列の先頭へのポインタを返す - (2) : - C 言語で使用されている文字列表現である、NULL(つまり `charT()`)で終端された文字配列の先頭へのポインタを返す @@ -34,7 +34,7 @@ constexpr charT* data() noexcept; // (2) C++20 ## 備考 - (1) : - - C++03まで : + - C++98まで : - 本メンバ関数で返されたポインタが指す配列の値を変更してはいけない。 - 本メンバ関数を呼び出すと、対象オブジェクトの要素への既存の参照、ポインタ、イテレータは無効になる可能性がある。 - 本メンバ関数で返されたポインタは、対象オブジェクトに対する非constメンバ関数呼び出しにより無効になる可能性がある。 diff --git a/reference/string/basic_string/empty.md b/reference/string/basic_string/empty.md index a68f8bd748..e5b0c7ad6d 100644 --- a/reference/string/basic_string/empty.md +++ b/reference/string/basic_string/empty.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool empty() const; // C++03 +bool empty() const; // C++98 bool empty() const noexcept; // C++11 [[nodiscard]] constexpr bool empty() const noexcept; // C++20 constexpr bool empty() const noexcept; // C++26 diff --git a/reference/string/basic_string/end.md b/reference/string/basic_string/end.md index 8438e0c7be..9c495ffa27 100644 --- a/reference/string/basic_string/end.md +++ b/reference/string/basic_string/end.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator end(); // (1) C++03 +iterator end(); // (1) C++98 iterator end() noexcept; // (1) C++11 constexpr iterator end() noexcept; // (1) C++20 -const_iterator end() const; // (2) C++03 +const_iterator end() const; // (2) C++98 const_iterator end() const noexcept; // (2) C++11 constexpr const_iterator end() const noexcept; // (2) C++20 ``` diff --git a/reference/string/basic_string/erase.md b/reference/string/basic_string/erase.md index 3c66ba8085..a81304286c 100644 --- a/reference/string/basic_string/erase.md +++ b/reference/string/basic_string/erase.md @@ -6,17 +6,17 @@ ```cpp basic_string& - erase(size_type pos = 0, size_type n = npos); // (1) C++03 + erase(size_type pos = 0, size_type n = npos); // (1) C++98 constexpr basic_string& erase(size_type pos = 0, size_type n = npos); // (1) C++20 -iterator erase(iterator p); // (2) C++03 +iterator erase(iterator p); // (2) C++98 iterator erase(const_iterator p); // (2) C++11 constexpr iterator erase(const_iterator p); // (2) C++20 iterator erase(iterator first, - iterator last); // (3) C++03 + iterator last); // (3) C++98 iterator erase(const_iterator first, const_iterator last); // (3) C++11 diff --git a/reference/string/basic_string/find.md b/reference/string/basic_string/find.md index 4480b0ab4c..91ab5a64aa 100644 --- a/reference/string/basic_string/find.md +++ b/reference/string/basic_string/find.md @@ -7,7 +7,7 @@ ```cpp size_type find(const basic_string& str, - size_type pos = 0) const; // (1) C++03 + size_type pos = 0) const; // (1) C++98 size_type find(const basic_string& str, size_type pos = 0) const noexcept; // (1) C++11 @@ -18,7 +18,7 @@ constexpr size_type size_type find(const charT* s, size_type pos, - size_type n) const; // (2) C++03 + size_type n) const; // (2) C++98 constexpr size_type find(const charT* s, size_type pos, @@ -26,14 +26,14 @@ constexpr size_type size_type find(const charT* s, - size_type pos = 0) const; // (3) C++03 + size_type pos = 0) const; // (3) C++98 constexpr size_type find(const charT* s, size_type pos = 0) const; // (3) C++20 size_type find(charT c, - size_type pos = 0) const; // (4) C++03 + size_type pos = 0) const; // (4) C++98 constexpr size_type find(charT c, size_type pos = 0) const; // (4) C++20 diff --git a/reference/string/basic_string/find_first_not_of.md b/reference/string/basic_string/find_first_not_of.md index d1dc602997..95429e2181 100644 --- a/reference/string/basic_string/find_first_not_of.md +++ b/reference/string/basic_string/find_first_not_of.md @@ -7,7 +7,7 @@ ```cpp size_type find_first_not_of(const basic_string& str, - size_type pos = 0) const; // (1) C++03 + size_type pos = 0) const; // (1) C++98 size_type find_first_not_of(const basic_string& str, size_type pos = 0) const noexcept; // (1) C++11 @@ -18,7 +18,7 @@ constexpr size_type size_type find_first_not_of(const charT* s, size_type pos, - size_type n) const; // (2) C++03 + size_type n) const; // (2) C++98 constexpr size_type find_first_not_of(const charT* s, size_type pos, @@ -26,14 +26,14 @@ constexpr size_type size_type find_first_not_of(const charT* s, - size_type pos = 0) const; // (3) C++03 + size_type pos = 0) const; // (3) C++98 constexpr size_type find_first_not_of(const charT* s, size_type pos = 0) const; // (3) C++20 size_type find_first_not_of(charT c, - size_type pos = 0) const; // (4) C++03 + size_type pos = 0) const; // (4) C++98 constexpr size_type find_first_not_of(charT c, size_type pos = 0) const; // (4) C++20 diff --git a/reference/string/basic_string/find_first_of.md b/reference/string/basic_string/find_first_of.md index 22a828fb2d..c47e85cc94 100644 --- a/reference/string/basic_string/find_first_of.md +++ b/reference/string/basic_string/find_first_of.md @@ -7,7 +7,7 @@ ```cpp size_type find_first_of(const basic_string& str, - size_type pos = 0) const; // (1) C++03 + size_type pos = 0) const; // (1) C++98 size_type find_first_of(const basic_string& str, size_type pos = 0) const noexcept; // (1) C++11 @@ -17,21 +17,21 @@ constexpr size_type size_type find_first_of(const charT* s, - size_type pos, size_type n) const; // (2) C++03 + size_type pos, size_type n) const; // (2) C++98 constexpr size_type find_first_of(const charT* s, size_type pos, size_type n) const; // (2) C++20 size_type find_first_of(const charT* s, - size_type pos = 0) const; // (3) C++03 + size_type pos = 0) const; // (3) C++98 constexpr size_type find_first_of(const charT* s, size_type pos = 0) const; // (3) C++20 size_type find_first_of(charT c, - size_type pos = 0) const; // (4) C++03 + size_type pos = 0) const; // (4) C++98 constexpr size_type find_first_of(charT c, size_type pos = 0) const; // (4) C++20 diff --git a/reference/string/basic_string/find_last_not_of.md b/reference/string/basic_string/find_last_not_of.md index 1ab9eeb60a..01e0b0edaf 100644 --- a/reference/string/basic_string/find_last_not_of.md +++ b/reference/string/basic_string/find_last_not_of.md @@ -7,7 +7,7 @@ ```cpp size_type find_last_not_of(const basic_string& str, - size_type pos = npos) const; // (1) C++03 + size_type pos = npos) const; // (1) C++98 size_type find_last_not_of(const basic_string& str, size_type pos = npos) const noexcept; // (1) C++11 @@ -18,7 +18,7 @@ constexpr size_type size_type find_last_not_of(const charT* s, size_type pos, - size_type n) const; // (2) C++03 + size_type n) const; // (2) C++98 constexpr size_type find_last_not_of(const charT* s, size_type pos, @@ -26,14 +26,14 @@ constexpr size_type size_type find_last_not_of(const charT* s, - size_type pos = npos) const; // (3) C++03 + size_type pos = npos) const; // (3) C++98 constexpr size_type find_last_not_of(const charT* s, size_type pos = npos) const; // (3) C++20 size_type find_last_not_of(charT c, - size_type pos = npos) const; // (4) C++03 + size_type pos = npos) const; // (4) C++98 constexpr size_type find_last_not_of(charT c, size_type pos = npos) const; // (4) C++20 diff --git a/reference/string/basic_string/find_last_of.md b/reference/string/basic_string/find_last_of.md index f9df515950..70a0337954 100644 --- a/reference/string/basic_string/find_last_of.md +++ b/reference/string/basic_string/find_last_of.md @@ -7,7 +7,7 @@ ```cpp size_type find_last_of(const basic_string& str, - size_type pos = npos) const; // (1) C++03 + size_type pos = npos) const; // (1) C++98 size_type find_last_of(const basic_string& str, size_type pos = npos) const noexcept; // (1) C++11 @@ -17,21 +17,21 @@ constexpr size_type size_type find_last_of(const charT* s, - size_type pos, size_type n) const; // (2) C++03 + size_type pos, size_type n) const; // (2) C++98 constexpr size_type find_last_of(const charT* s, size_type pos, size_type n) const; // (2) C++20 size_type find_last_of(const charT* s, - size_type pos = npos) const; // (3) C++03 + size_type pos = npos) const; // (3) C++98 constexpr size_type find_last_of(const charT* s, size_type pos = npos) const; // (3) C++20 size_type find_last_of(charT c, - size_type pos = npos) const; // (4) C++03 + size_type pos = npos) const; // (4) C++98 constexpr size_type find_last_of(charT c, size_type pos = npos) const; // (4) C++20 diff --git a/reference/string/basic_string/get_allocator.md b/reference/string/basic_string/get_allocator.md index 704b7929fd..687441f422 100644 --- a/reference/string/basic_string/get_allocator.md +++ b/reference/string/basic_string/get_allocator.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -allocator_type get_allocator() const; // (1) C++03 +allocator_type get_allocator() const; // (1) C++98 allocator_type get_allocator() const noexcept; // (1) C++11 constexpr allocator_type get_allocator() const noexcept; // (1) C++20 ``` @@ -49,7 +49,7 @@ int main() ## バージョン ### 言語 -- C++03 +- C++98 - C++11 ### 処理系 diff --git a/reference/string/basic_string/insert.md b/reference/string/basic_string/insert.md index 24e65de073..980cd228ef 100644 --- a/reference/string/basic_string/insert.md +++ b/reference/string/basic_string/insert.md @@ -6,13 +6,13 @@ ```cpp basic_string& - insert(size_type pos1, const basic_string& str); // (1) C++03 + insert(size_type pos1, const basic_string& str); // (1) C++98 constexpr basic_string& insert(size_type pos1, const basic_string& str); // (1) C++20 basic_string& insert(size_type pos1, const basic_string& str, - size_type pos2, size_type n); // (2) C++03 + size_type pos2, size_type n); // (2) C++98 basic_string& insert(size_type pos1, const basic_string& str, size_type pos2, size_type n = npos); // (2) C++14 @@ -21,32 +21,32 @@ constexpr basic_string& size_type pos2, size_type n = npos); // (2) C++20 basic_string& - insert(size_type pos, const charT* s, size_type n); // (3) C++03 + insert(size_type pos, const charT* s, size_type n); // (3) C++98 constexpr basic_string& insert(size_type pos, const charT* s, size_type n); // (3) C++20 basic_string& - insert(size_type pos, const charT* s); // (4) C++03 + insert(size_type pos, const charT* s); // (4) C++98 constexpr basic_string& insert(size_type pos, const charT* s); // (4) C++20 basic_string& - insert(size_type pos, size_type n, charT c); // (5) C++03 + insert(size_type pos, size_type n, charT c); // (5) C++98 constexpr basic_string& insert(size_type pos, size_type n, charT c); // (5) C++20 -iterator insert(iterator p, charT c); // (6) C++03 +iterator insert(iterator p, charT c); // (6) C++98 iterator insert(const_iterator p, charT c); // (6) C++11 constexpr iterator insert(const_iterator p, charT c); // (6) C++20 -void insert(iterator p, size_type n, charT c); // (7) C++03 +void insert(iterator p, size_type n, charT c); // (7) C++98 iterator insert(const_iterator p, size_type n, charT c); // (7) C++11 constexpr iterator insert(const_iterator p, size_type n, charT c); // (7) C++20 template void insert(iterator p, - InputIterator first, InputIterator last); // (8) C++03 + InputIterator first, InputIterator last); // (8) C++98 template iterator insert(const_iterator p, diff --git a/reference/string/basic_string/length.md b/reference/string/basic_string/length.md index 830178384a..44f6797e6d 100644 --- a/reference/string/basic_string/length.md +++ b/reference/string/basic_string/length.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type length() const; // (1) C++03 +size_type length() const; // (1) C++98 size_type length() const noexcept; // (1) C++11 constexpr size_type length() const noexcept; // (1) C++20 ``` diff --git a/reference/string/basic_string/max_size.md b/reference/string/basic_string/max_size.md index ea5764edd8..4c4da840eb 100644 --- a/reference/string/basic_string/max_size.md +++ b/reference/string/basic_string/max_size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type max_size() const; // (1) C++03 +size_type max_size() const; // (1) C++98 size_type max_size() const noexcept; // (1) C++11 constexpr size_type max_size() const noexcept; // (1) C++20 ``` diff --git a/reference/string/basic_string/op_assign.md b/reference/string/basic_string/op_assign.md index f5d26da6b3..664bd2d356 100644 --- a/reference/string/basic_string/op_assign.md +++ b/reference/string/basic_string/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -basic_string& operator=(const basic_string& str); // (1) C++03 +basic_string& operator=(const basic_string& str); // (1) C++98 constexpr basic_string& operator=(const basic_string& str); // (1) C++20 basic_string& operator=(basic_string&& str) noexcept; // (2) C++11 @@ -16,10 +16,10 @@ constexpr basic_string& operator=(basic_string&& str) noexcept (allocator_traits::propagate_on_container_move_assignment::value || allocator_traits::is_always_equal::value); // (2) C++20 -basic_string& operator=(const charT* s); // (3) C++03 +basic_string& operator=(const charT* s); // (3) C++98 constexpr basic_string& operator=(const charT* s); // (3) C++20 -basic_string& operator=(charT c); // (4) C++03 +basic_string& operator=(charT c); // (4) C++98 constexpr basic_string& operator=(charT c); // (4) C++20 basic_string& operator=(initializer_list il); // (5) C++11 diff --git a/reference/string/basic_string/op_at.md b/reference/string/basic_string/op_at.md index b29e3473d9..e29a7f40ee 100644 --- a/reference/string/basic_string/op_at.md +++ b/reference/string/basic_string/op_at.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -const_reference operator[](size_type pos) const; // (1) C++03 +const_reference operator[](size_type pos) const; // (1) C++98 constexpr const_reference operator[](size_type pos) const; // (1) C++20 -reference operator[](size_type pos); // (2) C++03 +reference operator[](size_type pos); // (2) C++98 constexpr reference operator[](size_type pos); // (2) C++20 ``` @@ -21,7 +21,7 @@ constexpr reference operator[](size_type pos); // (2) C++20 ## 戻り値 -- C++03 +- C++98 - `pos <` [`size()`](size.md) の場合、`*(`[`begin()`](begin.md) `+ pos)` を返す。 - `pos ==` [`size()`](size.md) の場合、(1) は `charT()` の値を持ったオブジェクトへの参照を返す。 - それ以外の場合は、未定義動作。 diff --git a/reference/string/basic_string/op_constructor.md b/reference/string/basic_string/op_constructor.md index 850de1bf11..851b5d230e 100644 --- a/reference/string/basic_string/op_constructor.md +++ b/reference/string/basic_string/op_constructor.md @@ -16,10 +16,10 @@ explicit basic_string(const Allocator& a); // (2) C++14 explicit basic_string(const Allocator& a) noexcept; // (2) C++17 constexpr explicit basic_string(const Allocator& a) noexcept; // (2) C++20 -explicit basic_string(const Allocator& a = Allocator()); // (1) + (2) C++03 +explicit basic_string(const Allocator& a = Allocator()); // (1) + (2) C++98 // コピーコンストラクタ -basic_string(const basic_string& str); // (3) C++03 +basic_string(const basic_string& str); // (3) C++98 constexpr basic_string(const basic_string& str); // (3) C++20 // ムーブコンストラクタ @@ -30,7 +30,7 @@ constexpr basic_string(basic_string&& str) noexcept; // (4) C++20 basic_string(const basic_string& str, size_type pos, size_type n = npos, - const Allocator& a = Allocator()); // (5) C++03 + const Allocator& a = Allocator()); // (5) C++98 basic_string(const basic_string& str, size_type pos, size_type n, @@ -59,13 +59,13 @@ constexpr basic_string(basic_string&& str, // 文字列ポインタから構築するコンストラクタ basic_string(const charT* s, size_type n, - const Allocator& a = Allocator()); // (7) C++03 + const Allocator& a = Allocator()); // (7) C++98 constexpr basic_string(const charT* s, size_type n, const Allocator& a = Allocator()); // (7) C++20 basic_string(const charT* s, - const Allocator& a = Allocator()); // (8) C++03 + const Allocator& a = Allocator()); // (8) C++98 constexpr basic_string(const charT* s, const Allocator& a = Allocator()); // (8) C++20 @@ -74,7 +74,7 @@ basic_string(nullptr_t) = delete; // (16) C++23 // 文字個数から構築するコンストラクタ basic_string(size_type n, charT c, - const Allocator& a = Allocator()); // (9) C++03 + const Allocator& a = Allocator()); // (9) C++98 constexpr basic_string(size_type n, charT c, const Allocator& a = Allocator()); // (9) C++20 @@ -82,7 +82,7 @@ constexpr basic_string(size_type n, // イテレータ範囲から構築するコンストラクタ template basic_string(InputIterator begin, InputIterator end, - const Allocator& a = Allocator()); // (10) C++03 + const Allocator& a = Allocator()); // (10) C++98 template constexpr basic_string(InputIterator begin, InputIterator end, const Allocator& a = Allocator()); // (10) C++20 @@ -157,10 +157,10 @@ constexpr basic_string(from_range_t, R&& rg, ## 要件 - (7) - - C++03 : `s`がヌルポインタではないこと。`n < npos`であること。 + - C++98 : `s`がヌルポインタではないこと。`n < npos`であること。 - C++14 : `s`は、`charT`型の要素を少なくても`n`個を持つ配列を指していること。 - (8) - - C++03 : `s`がヌルポインタではないこと。 + - C++98 : `s`がヌルポインタではないこと。 - C++14 : `s`は、`charT`型の要素を少なくても[`traits::length`](/reference/string/char_traits/length.md)`(s) + 1`個持つ配列を指していること。 diff --git a/reference/string/basic_string/op_destructor.md b/reference/string/basic_string/op_destructor.md index 12f4a1ea04..eac212861d 100644 --- a/reference/string/basic_string/op_destructor.md +++ b/reference/string/basic_string/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -~basic_string(); // (1) C++03 +~basic_string(); // (1) C++98 constexpr ~basic_string(); // (1) C++20 ``` diff --git a/reference/string/basic_string/op_equal.md b/reference/string/basic_string/op_equal.md index 71ffd0d111..1a54855eed 100644 --- a/reference/string/basic_string/op_equal.md +++ b/reference/string/basic_string/op_equal.md @@ -8,7 +8,7 @@ namespace std { template bool operator==(const basic_string& a, - const basic_string& b); // (1) C++03 + const basic_string& b); // (1) C++98 template bool operator==(const basic_string& a, @@ -21,7 +21,7 @@ namespace std { template bool operator==(const basic_string& a, - const CharT* b); // (2) C++03 + const CharT* b); // (2) C++98 template constexpr bool operator==(const basic_string& a, @@ -31,7 +31,7 @@ namespace std { template bool operator==(const CharT* a, - const basic_string& b); // (3) C++03 + const basic_string& b); // (3) C++98 template constexpr bool operator==(const CharT* a, diff --git a/reference/string/basic_string/op_greater.md b/reference/string/basic_string/op_greater.md index 46301e944c..1133d5e7f3 100644 --- a/reference/string/basic_string/op_greater.md +++ b/reference/string/basic_string/op_greater.md @@ -9,7 +9,7 @@ namespace std { template bool operator>(const basic_string& a, - const basic_string& b); // (1) C++03 + const basic_string& b); // (1) C++98 template bool operator>(const basic_string& a, @@ -22,7 +22,7 @@ namespace std { template bool operator>(const CharT* a, - const basic_string& b); // (2) C++03 + const basic_string& b); // (2) C++98 template constexpr bool operator>(const CharT* a, @@ -31,7 +31,7 @@ namespace std { template bool operator>(const basic_string& a, - const CharT* b); // (3) C++03 + const CharT* b); // (3) C++98 template constexpr bool operator>(const basic_string& a, diff --git a/reference/string/basic_string/op_greater_equal.md b/reference/string/basic_string/op_greater_equal.md index 2ba84b7b44..5552b697be 100644 --- a/reference/string/basic_string/op_greater_equal.md +++ b/reference/string/basic_string/op_greater_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator>=(const basic_string& a, - const basic_string& b); // (1) C++03 + const basic_string& b); // (1) C++98 template bool operator>=(const basic_string& a, @@ -22,7 +22,7 @@ namespace std { template bool operator>=(const CharT* a, - const basic_string& b); // (2) C++03 + const basic_string& b); // (2) C++98 template constexpr bool operator>=(const CharT* a, @@ -31,7 +31,7 @@ namespace std { template bool operator>=(const basic_string& a, - const CharT* b); // (3) C++03 + const CharT* b); // (3) C++98 template constexpr bool operator>=(const basic_string& a, diff --git a/reference/string/basic_string/op_less.md b/reference/string/basic_string/op_less.md index 9c817c67dc..195903bbf3 100644 --- a/reference/string/basic_string/op_less.md +++ b/reference/string/basic_string/op_less.md @@ -9,7 +9,7 @@ namespace std { template bool operator<(const basic_string& a, - const basic_string& b); // (1) C++03 + const basic_string& b); // (1) C++98 template bool operator<(const basic_string& a, @@ -22,7 +22,7 @@ namespace std { template bool operator<(const CharT* a, - const basic_string& b); // (2) C++03 + const basic_string& b); // (2) C++98 template constexpr bool operator<(const CharT* a, @@ -31,7 +31,7 @@ namespace std { template bool operator<(const basic_string& a, - const CharT* b); // (3) C++03 + const CharT* b); // (3) C++98 template constexpr bool operator<(const basic_string& a, diff --git a/reference/string/basic_string/op_less_equal.md b/reference/string/basic_string/op_less_equal.md index 2266d12ac5..ecb9f850dc 100644 --- a/reference/string/basic_string/op_less_equal.md +++ b/reference/string/basic_string/op_less_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator<=(const basic_string& a, - const basic_string& b); // (1) C++03 + const basic_string& b); // (1) C++98 template bool operator<=(const basic_string& a, @@ -22,7 +22,7 @@ namespace std { template bool operator<=(const CharT* a, - const basic_string& b); // (2) C++03 + const basic_string& b); // (2) C++98 template constexpr bool operator<=(const CharT* a, @@ -31,7 +31,7 @@ namespace std { template bool operator<=(const basic_string& a, - const CharT* b); // (3) C++03 + const CharT* b); // (3) C++98 template constexpr bool operator<=(const basic_string& a, diff --git a/reference/string/basic_string/op_not_equal.md b/reference/string/basic_string/op_not_equal.md index 957e816426..97ebe179ec 100644 --- a/reference/string/basic_string/op_not_equal.md +++ b/reference/string/basic_string/op_not_equal.md @@ -9,7 +9,7 @@ namespace std { template bool operator!=(const basic_string& a, - const basic_string& b); // (1) C++03 + const basic_string& b); // (1) C++98 template bool operator!=(const basic_string& a, @@ -23,7 +23,7 @@ namespace std { template bool operator!=(const CharT* a, - const basic_string& b); // (2) C++03 + const basic_string& b); // (2) C++98 template constexpr bool operator!=(const CharT* a, @@ -32,7 +32,7 @@ namespace std { template bool operator!=(const basic_string& a, - const CharT* b); // (3) C++03 + const CharT* b); // (3) C++98 template constexpr bool operator!=(const basic_string& a, diff --git a/reference/string/basic_string/op_plus.md b/reference/string/basic_string/op_plus.md index f1bc288eaa..056ca84f32 100644 --- a/reference/string/basic_string/op_plus.md +++ b/reference/string/basic_string/op_plus.md @@ -8,7 +8,7 @@ namespace std { template basic_string operator+(const basic_string& lhs, - const basic_string& rhs); // (1) C++03 + const basic_string& rhs); // (1) C++98 template constexpr basic_string operator+(const basic_string& lhs, @@ -45,7 +45,7 @@ namespace std { template basic_string operator+(const charT* lhs, - const basic_string& rhs); // (5) C++03 + const basic_string& rhs); // (5) C++98 template constexpr basic_string operator+(const charT* lhs, @@ -63,7 +63,7 @@ namespace std { template basic_string operator+(charT lhs, - const basic_string& rhs); // (7) C++03 + const basic_string& rhs); // (7) C++98 template constexpr basic_string operator+(charT lhs, @@ -81,7 +81,7 @@ namespace std { template basic_string operator+(const basic_string& lhs, - const charT* rhs); // (9) C++03 + const charT* rhs); // (9) C++98 template constexpr basic_string operator+(const basic_string& lhs, @@ -99,7 +99,7 @@ namespace std { template basic_string operator+(const basic_string& lhs, - charT rhs); // (11) C++03 + charT rhs); // (11) C++98 template constexpr basic_string operator+(const basic_string& lhs, @@ -352,7 +352,7 @@ Hello, World! ## バージョン ### 言語 -- C++03 +- C++98 - C++26 : (13), (14) ### 処理系 diff --git a/reference/string/basic_string/op_plus_assign.md b/reference/string/basic_string/op_plus_assign.md index a983c500f6..a265589f29 100644 --- a/reference/string/basic_string/op_plus_assign.md +++ b/reference/string/basic_string/op_plus_assign.md @@ -5,13 +5,13 @@ * function[meta id-type] ```cpp -basic_string& operator+=(const basic_string& str); // (1) C++03 +basic_string& operator+=(const basic_string& str); // (1) C++98 constexpr basic_string& operator+=(const basic_string& str); // (1) C++20 -basic_string& operator+=(const charT* s); // (2) C++03 +basic_string& operator+=(const charT* s); // (2) C++98 constexpr basic_string& operator+=(const charT* s); // (2) C++20 -basic_string& operator+=(charT c); // (3) C++03 +basic_string& operator+=(charT c); // (3) C++98 constexpr basic_string& operator+=(charT c); // (3) C++20 basic_string& operator+=(initializer_list il); // (4) C++11 @@ -44,7 +44,7 @@ constexpr basic_string& operator+=(const T& t); // (5) C++20 [`append`](append.md)`(str)` と等価。 - (2) 対象オブジェクトの末尾に `s` から始まる NULL で終端された文字列が追加される。 - [`append`](append.md)`(`[`basic_string`](/reference/string/basic_string.md)`(s))`(C++03 まで)、あるいは、[`append`](append.md)`(s)`(C++11 から)と等価。 + [`append`](append.md)`(`[`basic_string`](/reference/string/basic_string.md)`(s))`(C++98 まで)、あるいは、[`append`](append.md)`(s)`(C++11 から)と等価。 なお、`s` から始まる NULL 終端された文字列の長さは、`traits_type::length(s)` で求められる。 - (3) 対象オブジェクトの末尾に文字 `c` が追加される。 diff --git a/reference/string/basic_string/push_back.md b/reference/string/basic_string/push_back.md index bd129857e0..f8587553db 100644 --- a/reference/string/basic_string/push_back.md +++ b/reference/string/basic_string/push_back.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void push_back(charT c); // (1) C++03 +void push_back(charT c); // (1) C++98 constexpr void push_back(charT c); // (1) C++20 ``` diff --git a/reference/string/basic_string/rbegin.md b/reference/string/basic_string/rbegin.md index fa3731363b..d7899fbf33 100644 --- a/reference/string/basic_string/rbegin.md +++ b/reference/string/basic_string/rbegin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rbegin(); // (1) C++03 +reverse_iterator rbegin(); // (1) C++98 reverse_iterator rbegin() noexcept; // (1) C++11 constexpr reverse_iterator rbegin() noexcept; // (1) C++20 -const_reverse_iterator rbegin() const; // (2) C++03 +const_reverse_iterator rbegin() const; // (2) C++98 const_reverse_iterator rbegin() const noexcept; // (2) C++11 constexpr const_reverse_iterator rbegin() const noexcept; // (2) C++20 ``` diff --git a/reference/string/basic_string/rend.md b/reference/string/basic_string/rend.md index bf109d5a1b..f0ed6464a8 100644 --- a/reference/string/basic_string/rend.md +++ b/reference/string/basic_string/rend.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rend(); // (1) C++03 +reverse_iterator rend(); // (1) C++98 reverse_iterator rend() noexcept; // (1) C++11 constexpr reverse_iterator rend() noexcept; // (1) C++20 -const_reverse_iterator rend() const; // (2) C++03 +const_reverse_iterator rend() const; // (2) C++98 const_reverse_iterator rend() const noexcept; // (2) C++11 constexpr const_reverse_iterator rend() const noexcept; // (2) C++20 ``` diff --git a/reference/string/basic_string/replace.md b/reference/string/basic_string/replace.md index ae724a74c6..1b9073c834 100644 --- a/reference/string/basic_string/replace.md +++ b/reference/string/basic_string/replace.md @@ -8,7 +8,7 @@ basic_string& replace(size_type pos1, size_type n1, - const basic_string& str); // (1) C++03 + const basic_string& str); // (1) C++98 constexpr basic_string& replace(size_type pos1, size_type n1, @@ -37,7 +37,7 @@ basic_string& replace(size_type pos, size_type n1, const charT* s, - size_type n2); // (3) C++03 + size_type n2); // (3) C++98 constexpr basic_string& replace(size_type pos, size_type n1, @@ -47,7 +47,7 @@ constexpr basic_string& basic_string& replace(size_type pos, size_type n1, - const charT* s); // (4) C++03 + const charT* s); // (4) C++98 constexpr basic_string& replace(size_type pos, size_type n1, @@ -57,7 +57,7 @@ basic_string& replace(size_type pos, size_type n1, size_type n2, - charT c); // (5) C++03 + charT c); // (5) C++98 constexpr basic_string& replace(size_type pos, size_type n1, @@ -67,7 +67,7 @@ constexpr basic_string& basic_string& replace(iterator i1, iterator i2, - const basic_string& str); // (6) C++03 + const basic_string& str); // (6) C++98 basic_string& replace(const_iterator i1, const_iterator i2, @@ -81,7 +81,7 @@ basic_string& replace(iterator i1, iterator i2, const charT* s, - size_type n); // (7) C++03 + size_type n); // (7) C++98 basic_string& replace(const_iterator i1, const_iterator i2, @@ -96,7 +96,7 @@ constexpr basic_string& basic_string& replace(iterator i1, iterator i2, - const charT* s); // (8) C++03 + const charT* s); // (8) C++98 basic_string& replace(const_iterator i1, const_iterator i2, @@ -110,7 +110,7 @@ basic_string& replace(iterator i1, iterator i2, size_type n, - charT c); // (9) C++03 + charT c); // (9) C++98 basic_string& replace(const_iterator i1, const_iterator i2, @@ -125,7 +125,7 @@ basic_string& replace(iterator i1, iterator i2, InputIterator j1, - InputIterator j2); // (10) C++03 + InputIterator j2); // (10) C++98 template basic_string& replace(const_iterator i1, diff --git a/reference/string/basic_string/reserve.md b/reference/string/basic_string/reserve.md index fd73401735..cddd0c5125 100644 --- a/reference/string/basic_string/reserve.md +++ b/reference/string/basic_string/reserve.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void reserve(size_type res_arg = 0); // (1)+(2) C++03 +void reserve(size_type res_arg = 0); // (1)+(2) C++98 void reserve(); // (1) C++20で非推奨化, C++26で削除 @@ -17,7 +17,7 @@ constexpr void reserve(size_type res_arg); // (2) C++20 ## 効果 -- C++03 : [`capacity()`](capacity.md) `>= res_arg` となる +- C++98 : [`capacity()`](capacity.md) `>= res_arg` となる - C++20 : 現在の[`capacity()`](capacity.md)が`res_arg`より小さい場合に限り、[`capacity()`](capacity.md) `>= res_arg` となるようメモリの伸長をリクエストする @@ -31,7 +31,7 @@ constexpr void reserve(size_type res_arg); // (2) C++20 ## 非推奨・削除の詳細 -C++03で`reserve`操作でのメモリの縮小ができたことは、以下の問題があった: +C++98で`reserve`操作でのメモリの縮小ができたことは、以下の問題があった: - パフォーマンスの罠となっていた。この関数に指定する引数の値を慎重に選ばなければ、予想外の動的な再確保によってパフォーマンスを低下させる原因となっていた - 移植性の壁になっていた。メモリ縮小は実装に任せられたオプション機能であったため、環境による動作の違いがあった diff --git a/reference/string/basic_string/resize.md b/reference/string/basic_string/resize.md index 811d6aedb3..92788d93d4 100644 --- a/reference/string/basic_string/resize.md +++ b/reference/string/basic_string/resize.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -void resize(size_type n, charT c); // (1) C++03 +void resize(size_type n, charT c); // (1) C++98 constexpr void resize(size_type n, charT c); // (1) C++20 -void resize(size_type n); // (2) C++03 +void resize(size_type n); // (2) C++98 constexpr void resize(size_type n); // (2) C++20 ``` diff --git a/reference/string/basic_string/rfind.md b/reference/string/basic_string/rfind.md index f977933182..aa54d52e1e 100644 --- a/reference/string/basic_string/rfind.md +++ b/reference/string/basic_string/rfind.md @@ -7,7 +7,7 @@ ```cpp size_type rfind(const basic_string& str, - size_type pos = npos) const; // (1) C++03 + size_type pos = npos) const; // (1) C++98 size_type rfind(const basic_string& str, size_type pos = npos) const noexcept; // (1) C++11 @@ -17,21 +17,21 @@ constexpr size_type size_type rfind(const charT* s, - size_type pos, size_type n) const; // (2) C++03 + size_type pos, size_type n) const; // (2) C++98 constexpr size_type rfind(const charT* s, size_type pos, size_type n) const; // (2) C++20 size_type rfind(const charT* s, - size_type pos = npos) const; // (3) C++03 + size_type pos = npos) const; // (3) C++98 constexpr size_type rfind(const charT* s, size_type pos = npos) const; // (3) C++20 size_type rfind(charT c, - size_type pos = npos) const; // (4) C++03 + size_type pos = npos) const; // (4) C++98 constexpr size_type rfind(charT c, size_type pos = npos) const; // (4) C++20 diff --git a/reference/string/basic_string/size.md b/reference/string/basic_string/size.md index c6588a6557..b26942567c 100644 --- a/reference/string/basic_string/size.md +++ b/reference/string/basic_string/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type size() const; // (1) C++03 +size_type size() const; // (1) C++98 size_type size() const noexcept; // (1) C++11 constexpr size_type size() const noexcept; // (1) C++20 ``` diff --git a/reference/string/basic_string/substr.md b/reference/string/basic_string/substr.md index 721573102b..d182e61a58 100644 --- a/reference/string/basic_string/substr.md +++ b/reference/string/basic_string/substr.md @@ -7,7 +7,7 @@ ```cpp basic_string substr(size_type pos = 0, - size_type n = npos) const; // (1) C++03 + size_type n = npos) const; // (1) C++98 constexpr basic_string substr(size_type pos = 0, size_type n = npos) const; // (1) C++20 diff --git a/reference/string/basic_string/swap.md b/reference/string/basic_string/swap.md index 23aa4d2517..73f648f32e 100644 --- a/reference/string/basic_string/swap.md +++ b/reference/string/basic_string/swap.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void swap(basic_string& str); // (1) C++03 +void swap(basic_string& str); // (1) C++98 void swap(basic_string& str) noexcept (allocator_traits::propagate_on_container_swap::value || allocator_traits::is_always_equal::value); // (1) C++17 diff --git a/reference/string/basic_string/swap_free.md b/reference/string/basic_string/swap_free.md index 772dd369b8..f181c8f883 100644 --- a/reference/string/basic_string/swap_free.md +++ b/reference/string/basic_string/swap_free.md @@ -7,7 +7,7 @@ namespace std { template void swap(basic_string& x, - basic_string& y); // (1) C++03 + basic_string& y); // (1) C++98 template void swap(basic_string& x, basic_string& y) diff --git a/reference/string/char_traits/assign.md b/reference/string/char_traits/assign.md index 2c8eb1fae4..e8ee650aca 100644 --- a/reference/string/char_traits/assign.md +++ b/reference/string/char_traits/assign.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -static void assign(char_type& c1, const char_type& c2); // (1) C++03 +static void assign(char_type& c1, const char_type& c2); // (1) C++98 static void assign(char_type& c1, const char_type& c2) noexcept; // (1) C++11 static char_type* - assign(char_type* s, std::size_t n, char_type a); // (2) C++03 + assign(char_type* s, std::size_t n, char_type a); // (2) C++98 static constexpr char_type* assign(char_type* s, std::size_t n, char_type a); // (2) C++20 ``` diff --git a/reference/string/char_traits/copy.md b/reference/string/char_traits/copy.md index 8085be21a0..e0d02a30f0 100644 --- a/reference/string/char_traits/copy.md +++ b/reference/string/char_traits/copy.md @@ -7,7 +7,7 @@ ```cpp static char_type* copy(char_type* s1, const char_type* s2, - std::size_t n); // (1) C++03 + std::size_t n); // (1) C++98 static constexpr char_type* copy(char_type* s1, const char_type* s2, diff --git a/reference/string/char_traits/eof.md b/reference/string/char_traits/eof.md index 07d0672a55..f719a8bfd5 100644 --- a/reference/string/char_traits/eof.md +++ b/reference/string/char_traits/eof.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static int_type eof(); // C++03 +static int_type eof(); // C++98 static constexpr int_type eof() noexcept; // C++11 ``` diff --git a/reference/string/char_traits/eq.md b/reference/string/char_traits/eq.md index 1f96832c40..7b6bee9034 100644 --- a/reference/string/char_traits/eq.md +++ b/reference/string/char_traits/eq.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static bool eq(const char_type& c1, const char_type& c2); // C++03 +static bool eq(const char_type& c1, const char_type& c2); // C++98 static constexpr bool eq(char_type c1, char_type c2) noexcept; // C++11 ``` diff --git a/reference/string/char_traits/eq_int_type.md b/reference/string/char_traits/eq_int_type.md index c9522c8097..d997d0232a 100644 --- a/reference/string/char_traits/eq_int_type.md +++ b/reference/string/char_traits/eq_int_type.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static bool eq_int_type(const int_type& c1, const int_type& c2); // C++03 +static bool eq_int_type(const int_type& c1, const int_type& c2); // C++98 static constexpr bool eq_int_type(int_type c1, int_type c2) noexcept; // C++11 ``` diff --git a/reference/string/char_traits/lt.md b/reference/string/char_traits/lt.md index cef29352e3..012ecffaea 100644 --- a/reference/string/char_traits/lt.md +++ b/reference/string/char_traits/lt.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static bool lt(const char_type& c1, const char_type& c2); // C++03 +static bool lt(const char_type& c1, const char_type& c2); // C++98 static constexpr bool lt(char_type c1, char_type c2) noexcept; // C++11 ``` diff --git a/reference/string/char_traits/move.md b/reference/string/char_traits/move.md index 489c1e2996..e3750ce1c9 100644 --- a/reference/string/char_traits/move.md +++ b/reference/string/char_traits/move.md @@ -7,7 +7,7 @@ ```cpp static char_type* move(char_type* s1, const char_type* s2, - std::size_t n); // (1) C++03 + std::size_t n); // (1) C++98 static constexpr char_type* move(char_type* s1, const char_type* s2, diff --git a/reference/string/char_traits/not_eof.md b/reference/string/char_traits/not_eof.md index 83c261d5e6..61e07623f9 100644 --- a/reference/string/char_traits/not_eof.md +++ b/reference/string/char_traits/not_eof.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static int_type not_eof(const int_type& c); // C++03 +static int_type not_eof(const int_type& c); // C++98 static constexpr int_type not_eof(int_type c) noexcept; // C++11 ``` diff --git a/reference/string/char_traits/to_char_type.md b/reference/string/char_traits/to_char_type.md index 315d2046de..49532e88b0 100644 --- a/reference/string/char_traits/to_char_type.md +++ b/reference/string/char_traits/to_char_type.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static char_type to_char_type(const int_type& c); // C++03 +static char_type to_char_type(const int_type& c); // C++98 static constexpr char_type to_char_type(int_type c) noexcept; // C++11 ``` diff --git a/reference/string/char_traits/to_int_type.md b/reference/string/char_traits/to_int_type.md index 6a46ea546d..f90b84749a 100644 --- a/reference/string/char_traits/to_int_type.md +++ b/reference/string/char_traits/to_int_type.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -static int_type to_int_type(const char_type& c); // C++03 +static int_type to_int_type(const char_type& c); // C++98 static constexpr int_type to_int_type(char_type c) noexcept; // C++11 ``` diff --git a/reference/typeinfo/bad_cast/op_assign.md b/reference/typeinfo/bad_cast/op_assign.md index 02295ea075..8bfe8ebd0e 100644 --- a/reference/typeinfo/bad_cast/op_assign.md +++ b/reference/typeinfo/bad_cast/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bad_cast& operator=(const bad_cast&); // (1) C++03 +bad_cast& operator=(const bad_cast&); // (1) C++98 bad_cast& operator=(const bad_cast&) noexcept; // (1) C++11 constexpr bad_cast& operator=(const bad_cast&) noexcept; // (1) C++26 ``` diff --git a/reference/typeinfo/bad_cast/op_constructor.md b/reference/typeinfo/bad_cast/op_constructor.md index cd31f92e5a..063667ec97 100644 --- a/reference/typeinfo/bad_cast/op_constructor.md +++ b/reference/typeinfo/bad_cast/op_constructor.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -bad_cast(); // (1) C++03 +bad_cast(); // (1) C++98 bad_cast() noexcept; // (1) C++11 constexpr bad_cast() noexcept; // (1) C++26 -bad_cast(const bad_cast&); // (2) C++03 +bad_cast(const bad_cast&); // (2) C++98 bad_cast(const bad_cast&) noexcept; // (2) C++11 constexpr bad_cast(const bad_cast&) noexcept; // (2) C++26 ``` diff --git a/reference/typeinfo/bad_cast/op_destructor.md b/reference/typeinfo/bad_cast/op_destructor.md index cfe56e56ee..4ce095d658 100644 --- a/reference/typeinfo/bad_cast/op_destructor.md +++ b/reference/typeinfo/bad_cast/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -virtual ~bad_cast(); // (1) C++03 +virtual ~bad_cast(); // (1) C++98 constexpr virtual ~bad_cast(); // (1) C++26 ``` diff --git a/reference/typeinfo/bad_cast/what.md b/reference/typeinfo/bad_cast/what.md index 6a18ff4915..852218b5d7 100644 --- a/reference/typeinfo/bad_cast/what.md +++ b/reference/typeinfo/bad_cast/what.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -virtual const char* what() const; // (1) C++03 +virtual const char* what() const; // (1) C++98 virtual const char* what() const noexcept; // (1) C++11 const char* what() const noexcept override; // (1) C++17 constexpr const char* what() const noexcept override; // (1) C++26 diff --git a/reference/typeinfo/bad_typeid/op_assign.md b/reference/typeinfo/bad_typeid/op_assign.md index 93f97f4d85..8971047591 100644 --- a/reference/typeinfo/bad_typeid/op_assign.md +++ b/reference/typeinfo/bad_typeid/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bad_typeid& operator=(const bad_typeid&) throw(); // (1) C++03 +bad_typeid& operator=(const bad_typeid&) throw(); // (1) C++98 bad_typeid& operator=(const bad_typeid&) noexcept; // (1) C++11 constexpr bad_typeid& operator=(const bad_typeid&) noexcept; // (1) C++26 ``` diff --git a/reference/typeinfo/bad_typeid/op_constructor.md b/reference/typeinfo/bad_typeid/op_constructor.md index 015ae60594..79b7b5a20a 100644 --- a/reference/typeinfo/bad_typeid/op_constructor.md +++ b/reference/typeinfo/bad_typeid/op_constructor.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -bad_typeid() throw(); // (1) C++03 +bad_typeid() throw(); // (1) C++98 bad_typeid() noexcept; // (1) C++11 constexpr bad_typeid() noexcept; // (1) C++26 -bad_typeid(const bad_typeid&) throw(); // (2) C++03 +bad_typeid(const bad_typeid&) throw(); // (2) C++98 bad_typeid(const bad_typeid&) noexcept; // (2) C++11 constexpr bad_typeid(const bad_typeid&) noexcept; // (2) C++26 ``` diff --git a/reference/typeinfo/bad_typeid/op_destructor.md b/reference/typeinfo/bad_typeid/op_destructor.md index 6cd6214eb7..583107d9ee 100644 --- a/reference/typeinfo/bad_typeid/op_destructor.md +++ b/reference/typeinfo/bad_typeid/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -virtual ~bad_typeid(); // (1) C++03 +virtual ~bad_typeid(); // (1) C++98 constexpr virtual ~bad_typeid(); // (1) C++26 ``` diff --git a/reference/typeinfo/bad_typeid/what.md b/reference/typeinfo/bad_typeid/what.md index 1dfb47f7d1..a27fbd1d81 100644 --- a/reference/typeinfo/bad_typeid/what.md +++ b/reference/typeinfo/bad_typeid/what.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -virtual const char* what() const throw(); // (1) C++03 +virtual const char* what() const throw(); // (1) C++98 virtual const char* what() const noexcept; // (1) C++11 const char* what() const noexcept override; // (1) C++17 constexpr const char* what() const noexcept override; // (1) C++26 diff --git a/reference/typeinfo/type_info/before.md b/reference/typeinfo/type_info/before.md index ea88ce6499..8fc27c70dd 100644 --- a/reference/typeinfo/type_info/before.md +++ b/reference/typeinfo/type_info/before.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool before(const type_info& rhs) const; // C++03 +bool before(const type_info& rhs) const; // C++98 bool before(const type_info& rhs) const noexcept; // C++11 ``` diff --git a/reference/typeinfo/type_info/name.md b/reference/typeinfo/type_info/name.md index 492876a3bb..32fe82bbbd 100644 --- a/reference/typeinfo/type_info/name.md +++ b/reference/typeinfo/type_info/name.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -const char* name() const; // C++03 +const char* name() const; // C++98 const char* name() const noexcept; // C++11 ``` diff --git a/reference/typeinfo/type_info/op_equal.md b/reference/typeinfo/type_info/op_equal.md index e974c84112..938292410b 100644 --- a/reference/typeinfo/type_info/op_equal.md +++ b/reference/typeinfo/type_info/op_equal.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool operator==(const type_info& rhs) const; // (1) C++03 +bool operator==(const type_info& rhs) const; // (1) C++98 bool operator==(const type_info& rhs) const noexcept; // (1) C++11 constexpr bool operator==(const type_info& rhs) const noexcept; // (1) C++23 ``` diff --git a/reference/typeinfo/type_info/op_not_equal.md b/reference/typeinfo/type_info/op_not_equal.md index 8369925ea3..8371ac5f33 100644 --- a/reference/typeinfo/type_info/op_not_equal.md +++ b/reference/typeinfo/type_info/op_not_equal.md @@ -6,7 +6,7 @@ ```cpp // operator==により、以下の演算子が使用可能になる (C++20) -bool operator!=(const type_info& rhs) const; // (1) C++03 +bool operator!=(const type_info& rhs) const; // (1) C++98 bool operator!=(const type_info& rhs) const noexcept; // (1) C++11 ``` diff --git a/reference/utility/make_pair.md b/reference/utility/make_pair.md index dc2495d239..5345734757 100644 --- a/reference/utility/make_pair.md +++ b/reference/utility/make_pair.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - pair make_pair(T1, T2); // C++03 + pair make_pair(T1, T2); // C++98 template pair make_pair(T1&& x, T2&& y); // C++11 @@ -21,7 +21,7 @@ pairクラスのオブジェクトを構築する。 結果型の`V1`および`V2`は以下のような型となる: -- C++03 : +- C++98 : - `V1` : `T1` - `V2` : `T2` - C++11 : `T1`と`T2`それぞれの型`T`において、 diff --git a/reference/utility/pair.md b/reference/utility/pair.md index f7788b6fdf..2b3b52023e 100644 --- a/reference/utility/pair.md +++ b/reference/utility/pair.md @@ -101,7 +101,7 @@ namespace std { ## 例 -### 基本的な使い方 (C++03) +### 基本的な使い方 (C++98) ```cpp example #include #include diff --git a/reference/utility/pair/op_assign.md b/reference/utility/pair/op_assign.md index 14e6d5ab7a..8e8da1dec8 100644 --- a/reference/utility/pair/op_assign.md +++ b/reference/utility/pair/op_assign.md @@ -5,13 +5,13 @@ * function[meta id-type] ```cpp -pair& operator=(const pair& p); // (1) C++03 +pair& operator=(const pair& p); // (1) C++98 constexpr pair& operator=(const pair& p); // (1) C++20 constexpr const pair& operator=(const pair& p) const; // (2) C++23 template - pair& operator=(const pair& p); // (3) C++03 + pair& operator=(const pair& p); // (3) C++98 template constexpr pair& operator=(const pair& p); // (3) C++20 diff --git a/reference/utility/pair/op_constructor.md b/reference/utility/pair/op_constructor.md index afe1b8c322..213ce58eaf 100644 --- a/reference/utility/pair/op_constructor.md +++ b/reference/utility/pair/op_constructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -pair(); // (1) C++03 +pair(); // (1) C++98 constexpr pair(); // (1) C++11 EXPLICIT constexpr pair(); // (1) C++17 explicit(see below) constexpr pair(); // (1) C++20 @@ -13,7 +13,7 @@ explicit(see below) constexpr pair(); // (1) C++20 pair(const pair&) = default; // (2) pair(pair&&) = default; // (3) C++11 -pair(const T1& x, const T2& y); // (4) C++03 +pair(const T1& x, const T2& y); // (4) C++98 constexpr pair(const T1& x, const T2& y); // (4) C++14 EXPLICIT constexpr pair(const T1& x, const T2& y); // (4) C++17 explicit(see below) constexpr pair(const T1& x, const T2& y); // (4) C++20 @@ -33,7 +33,7 @@ template explicit(see below) constexpr pair(pair& p); // (6) C++23 template -pair(const pair& p); // (7) C++03 +pair(const pair& p); // (7) C++98 template constexpr pair(const pair& p); // (7) C++14 template @@ -278,7 +278,7 @@ p8 : (X(1 2 3),Y(4 5)) - [GCC](/implementation.md#gcc): 4.6.1 [mark verified] - [ICC](/implementation.md#icc): ?? - [Visual C++](/implementation.md#visual_cpp): 2010 [mark verified], 2012 [mark verified], 2013 [mark verified], 2015 [mark verified] - - C++03で規定されていたものは、2010より前のバージョンから実装されている。 + - C++98で規定されていたものは、2010より前のバージョンから実装されている。 - 2010までは、(11) `std::piecewise_construct`版が実装されていない。 - 2013までは、デフォルトコンストラクタに`constexpr`が付与されていない。 diff --git a/reference/utility/pair/op_equal.md b/reference/utility/pair/op_equal.md index a2101e5545..73272e0c9e 100644 --- a/reference/utility/pair/op_equal.md +++ b/reference/utility/pair/op_equal.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - bool operator==(const pair& x, const pair& y); // (1) C++03 + bool operator==(const pair& x, const pair& y); // (1) C++98 template constexpr bool operator==(const pair& x, const pair& y); // (1) C++14 diff --git a/reference/utility/pair/op_greater.md b/reference/utility/pair/op_greater.md index f0ceec80a8..6b784a36a3 100644 --- a/reference/utility/pair/op_greater.md +++ b/reference/utility/pair/op_greater.md @@ -7,7 +7,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template - bool operator>(const pair& x, const pair& y); // (1) C++03 + bool operator>(const pair& x, const pair& y); // (1) C++98 template constexpr bool operator>(const pair& x, const pair& y); // (1) C++14 diff --git a/reference/utility/pair/op_greater_equal.md b/reference/utility/pair/op_greater_equal.md index 474a12715d..5e3d9c7d7d 100644 --- a/reference/utility/pair/op_greater_equal.md +++ b/reference/utility/pair/op_greater_equal.md @@ -7,7 +7,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template - bool operator>=(const pair& x, const pair& y); // (1) C++03 + bool operator>=(const pair& x, const pair& y); // (1) C++98 template constexpr bool operator>=(const pair& x, const pair& y); // (1) C++14 diff --git a/reference/utility/pair/op_less.md b/reference/utility/pair/op_less.md index 8ef47d9eea..31b4c995b1 100644 --- a/reference/utility/pair/op_less.md +++ b/reference/utility/pair/op_less.md @@ -7,7 +7,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template - bool operator<(const pair& x, const pair& y); // (1) C++03 + bool operator<(const pair& x, const pair& y); // (1) C++98 template constexpr bool operator<(const pair& x, const pair& y); // (1) C++14 diff --git a/reference/utility/pair/op_less_equal.md b/reference/utility/pair/op_less_equal.md index 856d7eeb24..200fae53fa 100644 --- a/reference/utility/pair/op_less_equal.md +++ b/reference/utility/pair/op_less_equal.md @@ -7,7 +7,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template - bool operator<=(const pair& x, const pair& y); // (1) C++03 + bool operator<=(const pair& x, const pair& y); // (1) C++98 template constexpr bool operator<=(const pair& x, const pair& y); // (1) C++14 diff --git a/reference/utility/pair/op_not_equal.md b/reference/utility/pair/op_not_equal.md index 102e9c193e..b0e0319cb3 100644 --- a/reference/utility/pair/op_not_equal.md +++ b/reference/utility/pair/op_not_equal.md @@ -7,7 +7,7 @@ namespace std { // operator==により、以下の演算子が使用可能になる (C++20) template - bool operator!=(const pair& x, const pair& y); // (1) C++03 + bool operator!=(const pair& x, const pair& y); // (1) C++98 template constexpr bool operator!=(const pair& x, const pair& y); // (1) C++14 diff --git a/reference/utility/swap.md b/reference/utility/swap.md index 222f6202b4..369a23856e 100644 --- a/reference/utility/swap.md +++ b/reference/utility/swap.md @@ -7,7 +7,7 @@ ```cpp namespace std { template - void swap(T& a, T& b); // (1) C++03 in header + void swap(T& a, T& b); // (1) C++98 in header template void swap(T& a, T& b) noexcept(see below); // (1) C++11 @@ -81,7 +81,7 @@ swap(a, b); ## 備考 -C++03では``ヘッダに定義されていた。 +C++98では``ヘッダに定義されていた。 ## 例 diff --git a/reference/valarray/gslice/op_constructor.md b/reference/valarray/gslice/op_constructor.md index 332a1c8f81..82a3ee7d1a 100644 --- a/reference/valarray/gslice/op_constructor.md +++ b/reference/valarray/gslice/op_constructor.md @@ -20,7 +20,7 @@ gslice(const slice&); // (3) `gslice`オブジェクトを次に示す通りの要素で初期化する。 - (1) : - - C++03 : 未規定 + - C++98 : 未規定 - C++11 : `gslice( 0, valarray(), valarray() )`と等価。 - (2) : 初期位置`start`から要素数群`lengths`と間隔数群`strides`でスライスする`gslice`オブジェクトを構築する。 - `lengths`と`strides`はインデックス`0`番目から順に読み出され、`strides[0]`個おきに`lengths[0]`個を選び、そのそれぞれの位置からさらに`strides[1]`個おきに`lengths[1]`個を選び…とスライスされる。 diff --git a/reference/valarray/gslice_array/op_assign.md b/reference/valarray/gslice_array/op_assign.md index 09c6f4ae57..85690239da 100644 --- a/reference/valarray/gslice_array/op_assign.md +++ b/reference/valarray/gslice_array/op_assign.md @@ -6,7 +6,7 @@ ```cpp private: - gslice_array& operator=(const gslice_array&); // (1) C++03 まで(宣言のみ) + gslice_array& operator=(const gslice_array&); // (1) C++98 まで(宣言のみ) public: const gslice_array& operator=(const gslice_array& ar) const; // (1) C++11 から @@ -33,7 +33,7 @@ public: ## 備考 - 引数の型 *`ValOrProxy`* は、[`valarray`](../valarray.md)、あるいは、その代理となる型である。 [``](../../valarray.md) の概要も参照のこと。 -- (1) : C++03まで、このオーバーロードは使用できなかった。 +- (1) : C++98まで、このオーバーロードは使用できなかった。 - [`valarray`](../valarray.md) から抽出した要素数と `ar` の要素数が異なる場合、未定義動作を引き起こす。 diff --git a/reference/valarray/gslice_array/op_constructor.md b/reference/valarray/gslice_array/op_constructor.md index 41abbecbad..70f703fd98 100644 --- a/reference/valarray/gslice_array/op_constructor.md +++ b/reference/valarray/gslice_array/op_constructor.md @@ -6,8 +6,8 @@ ```cpp private: - gslice_array(); // (1) C++03 まで - gslice_array(const gslice_array&) // (2) C++03 まで + gslice_array(); // (1) C++98 まで + gslice_array(const gslice_array&) // (2) C++98 まで public: gslice_array() = delete; // (1) C++11 から diff --git a/reference/valarray/indirect_array/op_assign.md b/reference/valarray/indirect_array/op_assign.md index 37f93fff15..d0fcebd0f1 100644 --- a/reference/valarray/indirect_array/op_assign.md +++ b/reference/valarray/indirect_array/op_assign.md @@ -6,7 +6,7 @@ ```cpp private: - indirect_array& operator=(const indirect_array&); // (1) C++03 まで(宣言のみ) + indirect_array& operator=(const indirect_array&); // (1) C++98 まで(宣言のみ) public: const indirect_array& operator=(const indirect_array& ar) const; // (1) C++11 から @@ -32,7 +32,7 @@ public: ## 備考 - 引数の型 *`ValOrProxy`* は、[`valarray`](../valarray.md)、あるいは、その代理となる型である。 [``](../../valarray.md) の概要も参照のこと。 -- (1) : C++03まで、このオーバーロードは使用できなかった。 +- (1) : C++98まで、このオーバーロードは使用できなかった。 - [`valarray`](../valarray.md) から抽出した要素数と `ar` の要素数が異なる場合、未定義動作を引き起こす。 diff --git a/reference/valarray/indirect_array/op_constructor.md b/reference/valarray/indirect_array/op_constructor.md index aa21dd62e3..a58ced56ca 100644 --- a/reference/valarray/indirect_array/op_constructor.md +++ b/reference/valarray/indirect_array/op_constructor.md @@ -6,8 +6,8 @@ ```cpp private: - indirect_array(); // (1) C++03 まで - indirect_array(const indirect_array&) // (2) C++03 まで + indirect_array(); // (1) C++98 まで + indirect_array(const indirect_array&) // (2) C++98 まで public: indirect_array() = delete; // (1) C++11 から diff --git a/reference/valarray/mask_array/op_assign.md b/reference/valarray/mask_array/op_assign.md index 44a89f8e61..a7eb0fd52e 100644 --- a/reference/valarray/mask_array/op_assign.md +++ b/reference/valarray/mask_array/op_assign.md @@ -6,7 +6,7 @@ ```cpp private: - mask_array& operator=(const mask_array&); // (1) C++03 まで(宣言のみ) + mask_array& operator=(const mask_array&); // (1) C++98 まで(宣言のみ) public: const mask_array& operator=(const mask_array& ar) const; // (1) C++11 から @@ -33,7 +33,7 @@ public: ## 備考 - 引数の型 *`ValOrProxy`* は、[`valarray`](../valarray.md)、あるいは、その代理となる型である。 [``](../../valarray.md) の概要も参照のこと。 -- (1) : C++03まで、このオーバーロードは使用できなかった。 +- (1) : C++98まで、このオーバーロードは使用できなかった。 - [`valarray`](../valarray.md) から抽出した要素数と `ar` の要素数が異なる場合、未定義動作を引き起こす。 diff --git a/reference/valarray/mask_array/op_constructor.md b/reference/valarray/mask_array/op_constructor.md index 959bb9b5f8..77e98ef7fb 100644 --- a/reference/valarray/mask_array/op_constructor.md +++ b/reference/valarray/mask_array/op_constructor.md @@ -6,8 +6,8 @@ ```cpp private: - mask_array(); // (1) C++03 - mask_array(const mask_array&) // (2) C++03 + mask_array(); // (1) C++98 + mask_array(const mask_array&) // (2) C++98 public: mask_array() = delete; // (1) C++11 diff --git a/reference/valarray/slice/op_constructor.md b/reference/valarray/slice/op_constructor.md index 45f7fafb10..ef0a347127 100644 --- a/reference/valarray/slice/op_constructor.md +++ b/reference/valarray/slice/op_constructor.md @@ -19,7 +19,7 @@ slice(const slice&); // (3) `slice`オブジェクトを次に示す通りの要素で初期化する。 - (1) : - - C++03 : 未規定 + - C++98 : 未規定 - C++11 : `slice(0, 0 ,0)`と等価 - (2) : 初期位置`start`、要素数`length`、間隔`stride`でスライスする`slice`オブジェクトを構築する。 - (3) : コピーコンストラクタ。コピー元の`slice`オブジェクトと同じ初期位置、要素数、間隔でスライスする`slice`オブジェクトを構築する。 diff --git a/reference/valarray/slice_array/op_assign.md b/reference/valarray/slice_array/op_assign.md index 91f7ee452a..2b4b09f696 100644 --- a/reference/valarray/slice_array/op_assign.md +++ b/reference/valarray/slice_array/op_assign.md @@ -6,7 +6,7 @@ ```cpp private: - slice_array& operator=(const slice_array&); // (1) C++03 まで(宣言のみ) + slice_array& operator=(const slice_array&); // (1) C++98 まで(宣言のみ) public: const slice_array& operator=(const slice_array& ar) const; // (1) C++11 から @@ -33,7 +33,7 @@ public: ## 備考 - 引数の型 *`ValOrProxy`* は、[`valarray`](../valarray.md)、あるいは、その代理となる型である。 [``](../../valarray.md) の概要も参照のこと。 -- (1) : C++03まで、このオーバーロードは使用できなかった。 +- (1) : C++98まで、このオーバーロードは使用できなかった。 - [`valarray`](../valarray.md) から抽出した要素数と `ar` の要素数が異なる場合、未定義動作を引き起こす。 diff --git a/reference/valarray/slice_array/op_constructor.md b/reference/valarray/slice_array/op_constructor.md index 5d5d8c40ea..622063e85a 100644 --- a/reference/valarray/slice_array/op_constructor.md +++ b/reference/valarray/slice_array/op_constructor.md @@ -6,8 +6,8 @@ ```cpp private: - slice_array(); // (1) C++03 まで - slice_array(const slice_array&) // (2) C++03 まで + slice_array(); // (1) C++98 まで + slice_array(const slice_array&) // (2) C++98 まで public: slice_array() = delete; // (1) C++11 から diff --git a/reference/valarray/valarray/op_at.md b/reference/valarray/valarray/op_at.md index 119ee2b35a..361703ac97 100644 --- a/reference/valarray/valarray/op_at.md +++ b/reference/valarray/valarray/op_at.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -T operator[](std::size_t n) const; // (1) C++03 まで +T operator[](std::size_t n) const; // (1) C++98 まで const T& operator[](std::size_t n) const; // (1) C++11 から T& operator[](std::size_t n); // (2) @@ -275,4 +275,4 @@ int main() ## 参照 - [LWG Issue 389. Const overload of `valarray::operator[]` returns by value](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389) - - (1)の戻り値の型が、C++03の`T`から、C++11の`const T&`に変更された経緯のレポート + - (1)の戻り値の型が、C++98の`T`から、C++11の`const T&`に変更された経緯のレポート diff --git a/reference/vector/vector/assign.md b/reference/vector/vector/assign.md index 0e644ff1ae..3a5e99b7ab 100644 --- a/reference/vector/vector/assign.md +++ b/reference/vector/vector/assign.md @@ -6,11 +6,11 @@ ```cpp template -void assign(InputIterator first, InputIterator last); // (1) C++03 +void assign(InputIterator first, InputIterator last); // (1) C++98 template constexpr void assign(InputIterator first, InputIterator last); // (1) C++20 -void assign(size_type n, const T& t); // (2) C++03 +void assign(size_type n, const T& t); // (2) C++98 constexpr void assign(size_type n, const T& t); // (2) C++20 void assign(initializer_list il); // (3) C++11 diff --git a/reference/vector/vector/at.md b/reference/vector/vector/at.md index 2eea27de25..e013b116f0 100644 --- a/reference/vector/vector/at.md +++ b/reference/vector/vector/at.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -reference at(size_type n); // (1) C++03 +reference at(size_type n); // (1) C++98 constexpr reference at(size_type n); // (1) C++20 -const_reference at(size_type n) const; // (2) C++03 +const_reference at(size_type n) const; // (2) C++98 constexpr const_reference at(size_type n) const; // (2) C++20 ``` diff --git a/reference/vector/vector/back.md b/reference/vector/vector/back.md index 1bb42f8e2b..54cf01258c 100644 --- a/reference/vector/vector/back.md +++ b/reference/vector/vector/back.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -reference back(); // (1) C++03 +reference back(); // (1) C++98 constexpr reference back(); // (1) C++20 -const_reference back() const; // (2) C++03 +const_reference back() const; // (2) C++98 constexpr const_reference back() const; // (2) C++20 ``` diff --git a/reference/vector/vector/begin.md b/reference/vector/vector/begin.md index ab146af3b4..9fef963c02 100644 --- a/reference/vector/vector/begin.md +++ b/reference/vector/vector/begin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator begin(); // (1) C++03 +iterator begin(); // (1) C++98 iterator begin() noexcept; // (1) C++11 constexpr iterator begin() noexcept; // (1) C++20 -const_iterator begin() const; // (2) C++03 +const_iterator begin() const; // (2) C++98 const_iterator begin() const noexcept; // (2) C++11 constexpr const_iterator begin() const noexcept; // (2) C++20 ``` diff --git a/reference/vector/vector/capacity.md b/reference/vector/vector/capacity.md index 8c60095d0f..4954fa0a9f 100644 --- a/reference/vector/vector/capacity.md +++ b/reference/vector/vector/capacity.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type capacity() const; // (1) C++03 +size_type capacity() const; // (1) C++98 size_type capacity() const noexcept; // (1) C++11 constexpr size_type capacity() const noexcept; // (1) C++20 ``` diff --git a/reference/vector/vector/clear.md b/reference/vector/vector/clear.md index 82b8f6b354..8ef0088ae8 100644 --- a/reference/vector/vector/clear.md +++ b/reference/vector/vector/clear.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void clear(); // (1) C++03 +void clear(); // (1) C++98 constexpr void clear(); // (1) C++20 ``` @@ -60,5 +60,5 @@ int main() ## 参照 - [LWG Issue 2231. DR 704 removes complexity guarantee for `clear()`](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2231) - - C++03までこの関数の効果は`erase(begin(), end())`だったため、それによって線形時間の計算量が保証されていたが、C++11で効果の表記が変わったために、保証がなくなってしまっていた。C++14であらためて保証を追加。 + - C++98までこの関数の効果は`erase(begin(), end())`だったため、それによって線形時間の計算量が保証されていたが、C++11で効果の表記が変わったために、保証がなくなってしまっていた。C++14であらためて保証を追加。 - [P1004R2 Making `std::vector` constexpr](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1004r2.pdf) diff --git a/reference/vector/vector/data.md b/reference/vector/vector/data.md index bcd99e9c2a..87a8698a5c 100644 --- a/reference/vector/vector/data.md +++ b/reference/vector/vector/data.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -T* data(); // (1) C++03 +T* data(); // (1) C++98 T* data() noexcept; // (1) C++11 constexpr T* data() noexcept; // (1) C++20 -const T* data() const; // (2) C++03 +const T* data() const; // (2) C++98 const T* data() const noexcept; // (2) C++11 constexpr const T* data() const noexcept; // (2) C++20 ``` diff --git a/reference/vector/vector/empty.md b/reference/vector/vector/empty.md index 247bf51ae1..f67e505b9d 100644 --- a/reference/vector/vector/empty.md +++ b/reference/vector/vector/empty.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -bool empty() const; // (1) C++03 +bool empty() const; // (1) C++98 bool empty() const noexcept; // (1) C++11 [[nodiscard]] constexpr bool empty() const noexcept; // (1) C++20 constexpr bool empty() const noexcept; // (1) C++26 diff --git a/reference/vector/vector/end.md b/reference/vector/vector/end.md index 4a37f7e478..364499c0cd 100644 --- a/reference/vector/vector/end.md +++ b/reference/vector/vector/end.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator end(); // (1) C++03 +iterator end(); // (1) C++98 iterator end() noexcept; // (1) C++11 constexpr iterator end() noexcept; // (1) C++20 -const_iterator end() const; // (2) C++03 +const_iterator end() const; // (2) C++98 const_iterator end() const noexcept; // (2) C++11 constexpr const_iterator end() const noexcept; // (2) C++20 ``` diff --git a/reference/vector/vector/erase.md b/reference/vector/vector/erase.md index cb1c6f898b..2d31efb1dd 100644 --- a/reference/vector/vector/erase.md +++ b/reference/vector/vector/erase.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -iterator erase(iterator position); // (1) C++03 +iterator erase(iterator position); // (1) C++98 iterator erase(const_iterator position); // (1) C++11 constexpr iterator erase(const_iterator position); // (1) C++20 -iterator erase(iterator first, iterator last); // (2) C++03 +iterator erase(iterator first, iterator last); // (2) C++98 iterator erase(const_iterator first, const_iterator last); // (2) C++11 constexpr iterator erase(const_iterator first, diff --git a/reference/vector/vector/front.md b/reference/vector/vector/front.md index ae38a5c2f8..01c6d1876f 100644 --- a/reference/vector/vector/front.md +++ b/reference/vector/vector/front.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -reference front(); // (1) C++03 +reference front(); // (1) C++98 constexpr reference front(); // (1) C++20 -const_reference front() const; // (2) C++03 +const_reference front() const; // (2) C++98 constexpr const_reference front() const; // (2) C++20 ``` diff --git a/reference/vector/vector/get_allocator.md b/reference/vector/vector/get_allocator.md index b70a861374..c67a25b45b 100644 --- a/reference/vector/vector/get_allocator.md +++ b/reference/vector/vector/get_allocator.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -allocator_type get_allocator() const; // (1) C++03 +allocator_type get_allocator() const; // (1) C++98 allocator_type get_allocator() const noexcept; // (1) C++11 constexpr allocator_type get_allocator() const noexcept; // (1) C++20 ``` diff --git a/reference/vector/vector/insert.md b/reference/vector/vector/insert.md index 7fffa97d11..4827352c43 100644 --- a/reference/vector/vector/insert.md +++ b/reference/vector/vector/insert.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -iterator insert(iterator position, const T& x); // (1) C++03 +iterator insert(iterator position, const T& x); // (1) C++98 iterator insert(const_iterator position, const T& x); // (1) C++11 constexpr iterator insert(const_iterator position, const T& x); // (1) C++20 @@ -13,7 +13,7 @@ iterator insert(const_iterator position, T&& x); // (2) C++11 constexpr iterator insert(const_iterator position, T&& x); // (2) C++20 void insert(iterator position, - size_type n, const T& x); // (3) C++03 + size_type n, const T& x); // (3) C++98 iterator insert(const_iterator position, size_type n, const T& x); // (3) C++11 constexpr iterator insert(const_iterator position, @@ -22,7 +22,7 @@ constexpr iterator insert(const_iterator position, template void insert(iterator position, InputIterator first, - InputIterator last); // (4) C++03 + InputIterator last); // (4) C++98 template iterator insert(const_iterator position, InputIterator first, @@ -65,7 +65,7 @@ constexpr iterator insert(const_iterator position, ## 備考 - 要素を追加した後の[`size()`](size.md)が要素を追加する前の[`capacity()`](capacity.md)よりも大きい場合は領域の再確保が生じる。領域の再確保が生じなかった場合には挿入位置より前のイテレータや参照は有効である。 - 条件付きで、例外が発生した場合に副作用が発生しない保証がある。 - - C++03: 要素型`T`のコピーコンストラクタ、代入演算子以外で例外が発生した場合、副作用は発生しない。 + - C++98: 要素型`T`のコピーコンストラクタ、代入演算子以外で例外が発生した場合、副作用は発生しない。 - C++11: 要素型`T`のコピーコンストラクタ、ムーブコンストラクタ、代入演算子、ムーブ代入演算子、またはInputIteratorの操作以外で例外が発生した場合、副作用は発生しない。(ムーブとInputIteratorの操作について規定が追加された。) - C++14: 単一要素を終端に追加する場合は[`push_back()`](push_back.md)と同様。それ以外はC++11と同様。 diff --git a/reference/vector/vector/max_size.md b/reference/vector/vector/max_size.md index f471a763a2..5b059f5a64 100644 --- a/reference/vector/vector/max_size.md +++ b/reference/vector/vector/max_size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type max_size() const; // (1) C++03 +size_type max_size() const; // (1) C++98 size_type max_size() const noexcept; // (1) C++11 constexpr size_type max_size() const noexcept; // (1) C++20 ``` diff --git a/reference/vector/vector/op_assign.md b/reference/vector/vector/op_assign.md index df387153de..4e99b33d8b 100644 --- a/reference/vector/vector/op_assign.md +++ b/reference/vector/vector/op_assign.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -vector& operator=(const vector& x); // (1) C++03 +vector& operator=(const vector& x); // (1) C++98 constexpr vector& operator=(const vector& x); // (1) C++20 vector& operator=(vector&& x); // (2) C++11 diff --git a/reference/vector/vector/op_at.md b/reference/vector/vector/op_at.md index d17b913a37..cc82675cd1 100644 --- a/reference/vector/vector/op_at.md +++ b/reference/vector/vector/op_at.md @@ -5,10 +5,10 @@ * function[meta id-type] ```cpp -reference operator[](size_type n); // (1) C++03 +reference operator[](size_type n); // (1) C++98 constexpr reference operator[](size_type n); // (1) C++20 -const_reference operator[](size_type n) const; // (2) C++03 +const_reference operator[](size_type n) const; // (2) C++98 constexpr const_reference operator[](size_type n) const; // (2) C++20 ``` diff --git a/reference/vector/vector/op_constructor.md b/reference/vector/vector/op_constructor.md index b3716e250e..5bc77cf752 100644 --- a/reference/vector/vector/op_constructor.md +++ b/reference/vector/vector/op_constructor.md @@ -16,7 +16,7 @@ explicit vector(const Allocator& a); // (2) C++14 explicit vector(const Allocator&) noexcept; // (2) C++17 constexpr explicit vector(const Allocator&) noexcept; // (2) C++20 -explicit vector(const Allocator& a = Allocator()); // (1) + (2) C++03 +explicit vector(const Allocator& a = Allocator()); // (1) + (2) C++98 explicit vector(size_type n); // (3) C++11 explicit vector(size_type n, @@ -30,16 +30,16 @@ constexpr vector(size_type n, const T& value, const Allocator& a = Allocator()); // (4) C++20 explicit vector(size_type n, const T& value = T(), - const Allocator& a = Allocator()); // (3) + (4) C++03 + const Allocator& a = Allocator()); // (3) + (4) C++98 template vector(InputIter first, InputIter last, - const Allocator& a = Allocator()); // (5) C++03 + const Allocator& a = Allocator()); // (5) C++98 template constexpr vector(InputIter first, InputIter last, const Allocator& a = Allocator()); // (5) C++20 -vector(const vector& x); // (6) C++03 +vector(const vector& x); // (6) C++98 constexpr vector(const vector& x); // (6) C++20 vector(vector&& x); // (7) C++11 @@ -106,7 +106,7 @@ constexpr vector(std::from_range_t, R&& rg, ## 備考 -- イテレータ範囲コンストラクタ(5) `template vector(InputIter first, InputIter last, const Allocator& a = Allocator())` は、C++03 までは `InputIter` が整数型の場合には `vector(static_cast(first), static_cast(last), a)` と等価とされていたが、C++11 では `InputIter` が入力イテレータの要件を満たさなければオーバーロード解決に参加しないように変更された。 +- イテレータ範囲コンストラクタ(5) `template vector(InputIter first, InputIter last, const Allocator& a = Allocator())` は、C++98 までは `InputIter` が整数型の場合には `vector(static_cast(first), static_cast(last), a)` と等価とされていたが、C++11 では `InputIter` が入力イテレータの要件を満たさなければオーバーロード解決に参加しないように変更された。 - C++11 では、`explicit vector(size_type n, const T& value = T(), const Allocator& a = Allocator())` の引数 `value` に関するデフォルト引数が削除され、新たなコンストラクタ `explicit vector(size_type n)` が追加された。 これは、デフォルト引数を使用すると、引数 `value` のデフォルト初期化 1 回+`vector` の要素へのコピー初期化 `n` 回のコンストラクタ呼び出しが必要となるが、デフォルト引数でなければ `vector` の要素へのデフォルト初期化 `n` 回のコンストラクタ呼び出しで済むためである。 diff --git a/reference/vector/vector/op_destructor.md b/reference/vector/vector/op_destructor.md index 54cf8cf206..fc0491395c 100644 --- a/reference/vector/vector/op_destructor.md +++ b/reference/vector/vector/op_destructor.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -~vector(); // (1) C++03 +~vector(); // (1) C++98 constexpr ~vector(); // (1) C++20 ``` diff --git a/reference/vector/vector/op_equal.md b/reference/vector/vector/op_equal.md index 4d281bebcc..d13f681004 100644 --- a/reference/vector/vector/op_equal.md +++ b/reference/vector/vector/op_equal.md @@ -7,7 +7,7 @@ namespace std { template bool operator==(const vector& x, - const vector& y); // (1) C++03 + const vector& y); // (1) C++98 template constexpr bool operator==(const vector& x, @@ -24,7 +24,7 @@ namespace std { ## 効果 -- C++03 : `x.`[`size`](size.md)`() == y.`[`size`](size.md)`() &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` +- C++98 : `x.`[`size`](size.md)`() == y.`[`size`](size.md)`() &&` [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`());` - C++14 : [`equal`](/reference/algorithm/equal.md)`(x.`[`begin`](begin.md)`(), x.`[`end`](end.md)`(), y.`[`begin`](begin.md)`(), y.`[`end`](end.md)`());` diff --git a/reference/vector/vector/op_greater.md b/reference/vector/vector/op_greater.md index 2f70c0202a..5e4d420a85 100644 --- a/reference/vector/vector/op_greater.md +++ b/reference/vector/vector/op_greater.md @@ -8,7 +8,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template bool operator>(const vector& x, - const vector& y); // (1) C++03 + const vector& y); // (1) C++98 template constexpr bool operator>(const vector& x, diff --git a/reference/vector/vector/op_greater_equal.md b/reference/vector/vector/op_greater_equal.md index 878d505f99..7f043d5b75 100644 --- a/reference/vector/vector/op_greater_equal.md +++ b/reference/vector/vector/op_greater_equal.md @@ -8,7 +8,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template bool operator>=(const vector& x, - const vector& y); // (1) C++03 + const vector& y); // (1) C++98 template constexpr bool operator>=(const vector& x, diff --git a/reference/vector/vector/op_less.md b/reference/vector/vector/op_less.md index 9b14904321..4bc8bee27b 100644 --- a/reference/vector/vector/op_less.md +++ b/reference/vector/vector/op_less.md @@ -8,7 +8,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template bool operator<(const vector& x, - const vector& y); // (1) C++03 + const vector& y); // (1) C++98 template constexpr bool operator<(const vector& x, diff --git a/reference/vector/vector/op_less_equal.md b/reference/vector/vector/op_less_equal.md index 17415e6955..f51a66c023 100644 --- a/reference/vector/vector/op_less_equal.md +++ b/reference/vector/vector/op_less_equal.md @@ -8,7 +8,7 @@ namespace std { // operator<=>により、以下の演算子が使用可能になる (C++20) template bool operator<=(const vector& x, - const vector& y); // (1) C++03 + const vector& y); // (1) C++98 template constexpr bool operator<=(const vector& x, diff --git a/reference/vector/vector/op_not_equal.md b/reference/vector/vector/op_not_equal.md index d7fd9a21ad..91eca87069 100644 --- a/reference/vector/vector/op_not_equal.md +++ b/reference/vector/vector/op_not_equal.md @@ -8,7 +8,7 @@ namespace std { // operator==により、以下の演算子が使用可能になる (C++20) template bool operator!=(const vector& x, - const vector& y); // (1) C++03 + const vector& y); // (1) C++98 template constexpr bool operator!=(const vector& x, diff --git a/reference/vector/vector/pop_back.md b/reference/vector/vector/pop_back.md index 57683dba1a..20eb6d6e51 100644 --- a/reference/vector/vector/pop_back.md +++ b/reference/vector/vector/pop_back.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void pop_back(); // (1) C++03 +void pop_back(); // (1) C++98 constexpr void pop_back(); // (1) C++20 ``` diff --git a/reference/vector/vector/push_back.md b/reference/vector/vector/push_back.md index e2415d4589..ec88af6aa6 100644 --- a/reference/vector/vector/push_back.md +++ b/reference/vector/vector/push_back.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void push_back(const T& x); // (1) C++03 +void push_back(const T& x); // (1) C++98 constexpr void push_back(const T& x); // (1) C++20 void push_back(T&& x); // (2) C++11 @@ -44,7 +44,7 @@ constexpr void push_back(T&& x); // (2) C++20 ## 備考 - 要素を追加した後の[`size()`](size.md)が要素を追加する前の[`capacity()`](capacity.md)よりも大きい場合は領域の再確保が生じる。領域の再確保が生じた場合は、全てのイテレータ・参照・ポインタが無効になる(終端 (past-the-end) イテレータを含む)。領域の再確保が生じなかった場合の終端 (past-the-end) イテレータの扱いは、バージョンによって異なる。 - - C++03 : 終端イテレータが無効化されるとは規定されていない(挿入位置より前のイテレータ・参照のみ有効性が保証される) + - C++98 : 終端イテレータが無効化されるとは規定されていない(挿入位置より前のイテレータ・参照のみ有効性が保証される) - C++20 : 終端イテレータは無効になる。それ以外のイテレータや参照は有効である - 非コピー挿入可能な要素型`T`のムーブコンストラクタ以外で例外が発生した場合、副作用は発生しない。 @@ -85,16 +85,16 @@ world - [2倍だけじゃない - Derive Your Dreams](http://www.kmonos.net/wlog/111.html#_2334100705) - [それでも2倍だ - Derive Your Dreams](http://www.kmonos.net/wlog/111.html#_1001100720) - [LWG Issue 2252. Strong guarantee on `vector::push_back()` still broken with C++11?](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2252) - - C++03では、「`vector`の`push_back()`、`deque`の`push_back()`と`push_front()`で例外が発生した場合、副作用が発生しない」という強い保証があった。 + - C++98では、「`vector`の`push_back()`、`deque`の`push_back()`と`push_front()`で例外が発生した場合、副作用が発生しない」という強い保証があった。 - C++11では、ムーブ対応のため文面が見直されたが、その際に`insert()` `emplace()`とまとめて以下のような仕様となった: - 「(挿入操作において、)要素型 T のコピーコンストラクタ、ムーブコンストラクタ、代入演算子、ムーブ代入演算子、あるいはInputIteratorの操作以外で例外が発生した場合、副作用が発生しない。」 - このため、コピーコンストラクタで例外が発生した場合が保証の範囲外となり、保証が弱まってしまっていた。 - - C++14では、上記文面を見直し、終端(`deque`の場合は両端)への単一要素の追加の場合に限りC++03と等価の強い保証を提供するよう修正された。 + - C++14では、上記文面を見直し、終端(`deque`の場合は両端)への単一要素の追加の場合に限りC++98と等価の強い保証を提供するよう修正された。 - それに加えて、C++14ではこの強い保証を提供する関数を、以下のように拡大した: - - `vector`の`push_back()` (C++03から) + - `vector`の`push_back()` (C++98から) - `vector`の[`emplace_back()`](emplace_back.md) (C++14から) - `vector`の終端へ単一要素を挿入する[`insert()`](insert.md)と[`emplace()`](emplace.md) (C++14から) - - `deque`の[`push_back()`](/reference/deque/deque/push_back.md)と[`push_front()`](/reference/deque/deque/push_front.md) (C++03から) + - `deque`の[`push_back()`](/reference/deque/deque/push_back.md)と[`push_front()`](/reference/deque/deque/push_front.md) (C++98から) - `deque`の[`emplace_back()`](/reference/deque/deque/emplace_back.md)と[`emplace_front()`](/reference/deque/deque/emplace_front.md) (C++14から) - `deque`の両端へ単一要素を挿入する[`insert()`](/reference/deque/deque/insert.md)と[`emplace()`](/reference/deque/deque/emplace.md) (C++14) - [P1004R2 Making `std::vector` constexpr](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1004r2.pdf) diff --git a/reference/vector/vector/rbegin.md b/reference/vector/vector/rbegin.md index 64b9726785..51168257c2 100644 --- a/reference/vector/vector/rbegin.md +++ b/reference/vector/vector/rbegin.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rbegin(); // (1) C++03 +reverse_iterator rbegin(); // (1) C++98 reverse_iterator rbegin() noexcept; // (1) C++11 constexpr reverse_iterator rbegin() noexcept; // (1) C++20 -const_reverse_iterator rbegin() const; // (2) C++03 +const_reverse_iterator rbegin() const; // (2) C++98 const_reverse_iterator rbegin() const noexcept; // (2) C++11 constexpr const_reverse_iterator rbegin() const noexcept; // (2) C++20 ``` diff --git a/reference/vector/vector/rend.md b/reference/vector/vector/rend.md index c0242cf1cf..00393f80e2 100644 --- a/reference/vector/vector/rend.md +++ b/reference/vector/vector/rend.md @@ -5,11 +5,11 @@ * function[meta id-type] ```cpp -reverse_iterator rend(); // (1) C++03 +reverse_iterator rend(); // (1) C++98 reverse_iterator rend() noexcept; // (1) C++11 constexpr reverse_iterator rend() noexcept; // (1) C++20 -const_reverse_iterator rend() const; // (2) C++03 +const_reverse_iterator rend() const; // (2) C++98 const_reverse_iterator rend() const noexcept; // (2) C++11 constexpr const_reverse_iterator rend() const noexcept; // (2) C++20 ``` diff --git a/reference/vector/vector/reserve.md b/reference/vector/vector/reserve.md index d55722f2f4..7f0dbcbcaf 100644 --- a/reference/vector/vector/reserve.md +++ b/reference/vector/vector/reserve.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void reserve(size_type n); // (1) C++03 +void reserve(size_type n); // (1) C++98 constexpr void reserve(size_type n); // (1) C++20 ``` diff --git a/reference/vector/vector/resize.md b/reference/vector/vector/resize.md index 5a6d19c4da..4c4b3904d3 100644 --- a/reference/vector/vector/resize.md +++ b/reference/vector/vector/resize.md @@ -11,7 +11,7 @@ constexpr void resize(size_type sz); // (1) C++20 void resize(size_type sz, const T& c); // (2) C++11 constexpr void resize(size_type sz, const T& c); // (2) C++20 -void resize(size_type sz, T c = T()); // (1) + (2) C++03 +void resize(size_type sz, T c = T()); // (1) + (2) C++98 ``` ## 要件 diff --git a/reference/vector/vector/size.md b/reference/vector/vector/size.md index 1d06e8f42e..40e1c309a9 100644 --- a/reference/vector/vector/size.md +++ b/reference/vector/vector/size.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -size_type size() const; // (1) C++03 +size_type size() const; // (1) C++98 size_type size() const noexcept; // (1) C++11 constexpr size_type size() const noexcept; // (1) C++20 ``` diff --git a/reference/vector/vector/swap.md b/reference/vector/vector/swap.md index 428f6d2f92..a26daf1adc 100644 --- a/reference/vector/vector/swap.md +++ b/reference/vector/vector/swap.md @@ -5,7 +5,7 @@ * function[meta id-type] ```cpp -void swap(vector& x); // (1) C++03 +void swap(vector& x); // (1) C++98 void swap(vector& x) // (1) C++17 noexcept(allocator_traits::propagate_on_container_swap::value || allocator_traits::is_always_equal::value); diff --git a/reference/vector/vector/swap_free.md b/reference/vector/vector/swap_free.md index 09848a4c6c..946c99f116 100644 --- a/reference/vector/vector/swap_free.md +++ b/reference/vector/vector/swap_free.md @@ -6,7 +6,7 @@ ```cpp namespace std { template - void swap(vector& x, vector& y); // (1) C++03 + void swap(vector& x, vector& y); // (1) C++98 template void swap(vector& x, vector& y) diff --git a/start_editing/class_template_page.md b/start_editing/class_template_page.md index bef74b1693..aa2c99c076 100644 --- a/start_editing/class_template_page.md +++ b/start_editing/class_template_page.md @@ -168,7 +168,7 @@ int main() - [Visual C++](/implementation.md#visual_cpp): 2003 [mark verified], 2005 [mark verified], 2008 [mark verified], 2010 [mark verified], 2012 [mark verified] (ここには、その機能が存在する言語のバージョンと、確認がとれたコンパイラとそのバージョンを記述します。) -(これらの項目を削除した場合、C++03のあらゆる環境で使用できることを意味します。) +(これらの項目を削除した場合、C++98のあらゆる環境で使用できることを意味します。) ## 関連項目 diff --git a/start_editing/comparison_operator_template_page.md b/start_editing/comparison_operator_template_page.md index a61360c1a1..afc20e0d9d 100644 --- a/start_editing/comparison_operator_template_page.md +++ b/start_editing/comparison_operator_template_page.md @@ -164,7 +164,7 @@ int main() - [Visual C++](/implementation.md#visual_cpp): 2003 [mark verified], 2005 [mark verified], 2008 [mark verified], 2010 [mark verified], 2012 [mark verified] (ここには、その機能が存在する言語のバージョンと、確認がとれたコンパイラとそのバージョンを記述します。) -(これらの項目を削除した場合、C++03のあらゆる環境で使用できることを意味します。) +(これらの項目を削除した場合、C++98のあらゆる環境で使用できることを意味します。) (確認のテストできないときは、??を記述してください。) ### 備考 diff --git a/start_editing/cpo_template_page.md b/start_editing/cpo_template_page.md index 5b9e88671d..f7be15436b 100644 --- a/start_editing/cpo_template_page.md +++ b/start_editing/cpo_template_page.md @@ -109,7 +109,7 @@ int main() - [Visual C++](/implementation.md#visual_cpp): ?? (ここには、その機能が存在する言語のバージョンと、確認がとれたコンパイラとそのバージョンを記述します。) -(これらの項目を削除した場合、C++03のあらゆる環境で使用できることを意味します。) +(これらの項目を削除した場合、C++98のあらゆる環境で使用できることを意味します。) (確認のテストできないときは、??を記述してください。) ### 備考 diff --git a/start_editing/function_template_page.md b/start_editing/function_template_page.md index 71b2d2427e..b0c1e7df26 100644 --- a/start_editing/function_template_page.md +++ b/start_editing/function_template_page.md @@ -171,7 +171,7 @@ int main() - [Visual C++](/implementation.md#visual_cpp): 2003 [mark verified], 2005 [mark verified], 2008 [mark verified], 2010 [mark verified], 2012 [mark verified] (ここには、その機能が存在する言語のバージョンと、確認がとれたコンパイラとそのバージョンを記述します。) -(これらの項目を削除した場合、C++03のあらゆる環境で使用できることを意味します。) +(これらの項目を削除した場合、C++98のあらゆる環境で使用できることを意味します。) (確認のテストできないときは、??を記述してください。) ### 備考 diff --git a/start_editing/header_template_page.md b/start_editing/header_template_page.md index ba60103993..ecd7b39045 100644 --- a/start_editing/header_template_page.md +++ b/start_editing/header_template_page.md @@ -59,7 +59,7 @@ - [Visual C++](/implementation.md#visual_cpp): 2003 [mark verified], 2005 [mark verified], 2008 [mark verified], 2010 [mark verified], 2012 [mark verified] (ここには、そのヘッダファイルが存在する言語のバージョンと、確認がとれたコンパイラとそのバージョンを記述します。) -(これらの項目を削除した場合、C++03のあらゆる環境で使用できることを意味します。) +(これらの項目を削除した場合、C++98のあらゆる環境で使用できることを意味します。) ## 関連項目 diff --git a/start_editing/module_template_page.md b/start_editing/module_template_page.md index 866c3f9149..fd3864c2fd 100644 --- a/start_editing/module_template_page.md +++ b/start_editing/module_template_page.md @@ -42,7 +42,7 @@ - [Visual C++](/implementation.md#visual_cpp): ? (ここには、そのモジュールが存在する言語のバージョンと、確認がとれたコンパイラとそのバージョンを記述します。) -(これらの項目を削除した場合、C++03のあらゆる環境で使用できることを意味します。) +(これらの項目を削除した場合、C++98のあらゆる環境で使用できることを意味します。) ## 関連項目 (ここには、その機能と関連のあるcpprefjpサイト内の項目へのリンクを記述します。とくに必要がないと判断した場合、項目を削除してください。) diff --git a/start_editing/type-type_template_page.md b/start_editing/type-type_template_page.md index fd9efa626b..2bedf64130 100644 --- a/start_editing/type-type_template_page.md +++ b/start_editing/type-type_template_page.md @@ -87,7 +87,7 @@ typedef origin_type new_type; - [Visual C++](/implementation.md#visual_cpp): 2003 [mark verified], 2005 [mark verified], 2008 [mark verified], 2010 [mark verified], 2012 [mark verified] (ここには、その機能が存在する言語のバージョンと、確認がとれたコンパイラとそのバージョンを記述します。) -(これらの項目を削除した場合、C++03のあらゆる環境で使用できることを意味します。) +(これらの項目を削除した場合、C++98のあらゆる環境で使用できることを意味します。) (確認のテストできないときは、??を記述してください。) ### 備考 diff --git a/working_style.md b/working_style.md index cdabef7419..8d952356d7 100644 --- a/working_style.md +++ b/working_style.md @@ -21,13 +21,14 @@ ## バージョンの表記 ### 言語 -C++11以降対応については対応バージョンを明記します。バージョン表記が省略されている場合、C++03、C++98対応であることを表します。 +C++11以降対応については対応バージョンを明記します。バージョン表記が省略されている場合、C++98対応であることを表します。 + +最初の規格に由来する機能のバージョン表記は`C++98`に統一します。`C++03`は使用しません。C++03 (ISO/IEC 14882:2003) はC++98に技術訂正 (TC1) を適用したものであり、ライブラリの内容はほぼ同一のためです。TC1で入った変更そのものを説明する場合に限り`C++03`と書きます。 #### 例 - C++17 - C++14 - C++11 -- C++03 - C++98