diff --git a/reference/array/to_array.md b/reference/array/to_array.md index 27b5dfcf95..159143c0f6 100644 --- a/reference/array/to_array.md +++ b/reference/array/to_array.md @@ -23,8 +23,8 @@ namespace std { ## 事前条件 -- (1) : `T` は `Cpp17CopyConstructible` 要件を満たしていること。 -- (2) : `T` は `Cpp17MoveConstructible` 要件を満たしていること。 +- (1) : `T` は [`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink) 要件を満たしていること。 +- (2) : `T` は [`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink) 要件を満たしていること。 ## 戻り値 diff --git a/reference/barrier/barrier.md b/reference/barrier/barrier.md index b39af7e850..b281b44fc3 100644 --- a/reference/barrier/barrier.md +++ b/reference/barrier/barrier.md @@ -45,15 +45,15 @@ namespace std { 完了ステップの終了は、完了ステップによりブロック解除される全ての関数呼び出しからの復帰**よりも確実に前に発生する**。 テンプレートパラメータ`CompletionFunction`のデフォルト値以外の特殊化においては、完了ステップの進行中にバリアオブジェクトの[`wait()`](barrier/wait.md)を除くメンバ関数が呼び出されると、その動作は未定義となる。 -テンプレートパラメータ`CompletionFunction`のデフォルト値は、追加で Cpp17DefaultConstructible 要件を満たす未規定の型であり、式`completion()`は何の副作用も生じない。 +テンプレートパラメータ`CompletionFunction`のデフォルト値は、追加で [`Cpp17DefaultConstructible`](/requirements/Cpp17DefaultConstructible.md.nolink) 要件を満たす未規定の型であり、式`completion()`は何の副作用も生じない。 つまりテンプレートパラメータを省略した`barrier<>`オブジェクトでは、各フェーズ完了時に追加的な処理を行わない。 -`barrier::arrival_token`は、Cpp17MoveConstructible 要件および Cpp17MoveAssignable 要件および Cpp17Destructible 要件を満たす未規定の型。 +`barrier::arrival_token`は、[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink) 要件および [`Cpp17MoveAssignable`](/requirements/Cpp17MoveAssignable.md.nolink) 要件および [`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink) 要件を満たす未規定の型。 つまり、コピー不可/ムーブのみ可能な型。 ## 適格要件 -テンプレートパラメータ`CompletionFunction`は Cpp17MoveConstructible 要件および Cpp17Destructible 要件を満たしていること。 +テンプレートパラメータ`CompletionFunction`は [`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink) 要件および [`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink) 要件を満たしていること。 [`is_nothrow_invocable_v`](/reference/type_traits/is_nothrow_invocable.md)` == true` diff --git a/reference/chrono/is_clock.md b/reference/chrono/is_clock.md index 12cd2ce41d..85f8efd0b4 100644 --- a/reference/chrono/is_clock.md +++ b/reference/chrono/is_clock.md @@ -86,4 +86,4 @@ int main() ## 参照 - [LWG Issue 4487. Is member `is_steady` of a Cpp17Clock type required to be usable in constant expressions?](https://cplusplus.github.io/LWG/issue4487) - - `C1::is_steady`が定数式で使用できることが要件に追加された。それ以前は`const bool`とだけ規定されており、利用者定義のクロックに対して同じ要求があるかが不明確だった。規格としてはC++29のワーキングドラフトへ適用されたが、未規定だった点の明文化であるため、Cpp17Clock要件が規定されたC++11へ遡及して適用される + - `C1::is_steady`が定数式で使用できることが要件に追加された。それ以前は`const bool`とだけ規定されており、利用者定義のクロックに対して同じ要求があるかが不明確だった。規格としてはC++29のワーキングドラフトへ適用されたが、未規定だった点の明文化であるため、[`Cpp17Clock`](/requirements/Cpp17Clock.md.nolink)要件が規定されたC++11へ遡及して適用される diff --git a/reference/concepts/Invoke.md b/reference/concepts/Invoke.md index 5c138ad541..92780676d7 100644 --- a/reference/concepts/Invoke.md +++ b/reference/concepts/Invoke.md @@ -58,7 +58,7 @@ C++における関数呼び出しという性質を抽象化しまとめた、 2. *INVOKE*`(f, t1, t2, ..., tN)` を次のように定義する。 - `R`が`void`かそのcv修飾の場合は、`static_cast(`*INVOKE*`(f, t1, t2, ..., tN))`。 - それ以外の場合は、*INVOKE*`(f, t1, t2, ..., tN)` の実行結果の戻り値が型 `R` に暗黙的に変換されること。 -3. すべての *call-wrapper* は、*Cpp17MoveConstructible* かつ *Cpp17Destructible* でなければならない。 +3. すべての *call-wrapper* は、[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink) かつ [`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink) でなければならない。 ## 要件(C++23差分) C++20 における 2. について、次の文言を項目の最後に追加する。この変更は、`R`が参照かつ*INVOKE*の実行結果が`R`に束縛されることで寿命が延長される場合にダングリング参照が作成されてしまう事例を検出するための要件である。 diff --git a/reference/exception/throw_with_nested.md b/reference/exception/throw_with_nested.md index 4aa55b9685..818dc3e772 100644 --- a/reference/exception/throw_with_nested.md +++ b/reference/exception/throw_with_nested.md @@ -16,7 +16,7 @@ namespace std { ## 事前条件 -`U`を [`decay_t`](/reference/type_traits/decay.md)`` として、型`U`がコピー構築可能(*Cpp17CopyConstructible*)の要件を満たすこと。 +`U`を [`decay_t`](/reference/type_traits/decay.md)`` として、型`U`がコピー構築可能([`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink))の要件を満たすこと。 ## 例外 diff --git a/reference/execution/execution/task.md b/reference/execution/execution/task.md index cf592d17de..8a602548f8 100644 --- a/reference/execution/execution/task.md +++ b/reference/execution/execution/task.md @@ -36,7 +36,7 @@ namespace std::execution { `error_types`が[`completion_signatures`](completion_signatures.md)``の特殊化ではない、もしくは`ErrorSigs`が[`set_error_t`](set_error.md)`(E)`が適格でない要素型`E`を含むとき、プログラムは不適格となる。 -`allocator_type`はCpp17Allocator要件を満たし、`start_scheduler_type`は[`scheduler`](scheduler.md)のモデルであり、`stop_source_type`は[`stoppable-source`](/reference/stop_token/stoppable-source.md)のモデルであること。 +`allocator_type`は[`Cpp17Allocator`](/requirements/Cpp17Allocator.md)要件を満たし、`start_scheduler_type`は[`scheduler`](scheduler.md)のモデルであり、`stop_source_type`は[`stoppable-source`](/reference/stop_token/stoppable-source.md)のモデルであること。 `task`クラステンプレートは、下記の静的メンバ関数テンプレートを定義する。 diff --git a/reference/expected/expected.md b/reference/expected/expected.md index 64c8e8a3ab..7f71333e38 100644 --- a/reference/expected/expected.md +++ b/reference/expected/expected.md @@ -29,9 +29,9 @@ namespace std { - 型`T`および型`E`は、参照型、関数型、[`in_place_t`](/reference/utility/in_place_t.md)、[`unexpect_t`](unexpect_t.md)のいずれでもないこと。 - 型`T`は[`unexpected`](unexpected.md)の特殊化ではないこと。 -- 型`T`が(CV修飾された)`void`型でなければ、型`T`はCpp17Destructible要件を満たすこと。 +- 型`T`が(CV修飾された)`void`型でなければ、型`T`は[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件を満たすこと。 - 型`E`は非オブジェクト型、配列型、`unexpected`の特殊化、CV修飾された型のいずれでもないこと。 -- 型`E`はCpp17Destructible要件を満たすこと。 +- 型`E`は[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件を満たすこと。 ## メンバ関数(プライマリテンプレート) diff --git a/reference/format/formatter.md b/reference/format/formatter.md index 67f28878ef..cbebb88073 100644 --- a/reference/format/formatter.md +++ b/reference/format/formatter.md @@ -65,7 +65,7 @@ namespace std { 型`F`がFormatter要件を満たすとは、次のことをいう。 -- `F`は`Cpp17DefaultConstructible`、`Cpp17CopyConstructible`、`Cpp17CopyAssignable`、`Cpp17Destructible`であること +- `F`は[`Cpp17DefaultConstructible`](/requirements/Cpp17DefaultConstructible.md.nolink)、[`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink)、[`Cpp17CopyAssignable`](/requirements/Cpp17CopyAssignable.md.nolink)、[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)であること さらに、以下の条件を満たすこと diff --git a/reference/functional/bind_back.md b/reference/functional/bind_back.md index 254ae79b0d..ac3343ea17 100644 --- a/reference/functional/bind_back.md +++ b/reference/functional/bind_back.md @@ -25,10 +25,10 @@ namespace std { [`decay_t`](/reference/type_traits/decay.md)``を適用した型を`FD`、[`decay_t`](/reference/type_traits/decay.md)`...`を適用した型パラメータパックを`BoundArgs`として - (1) : - - `FD`がCpp17MoveConstructible要件を満たすこと - - `BoundArgs`のそれぞれの型`Ti`が[オブジェクト型](/reference/type_traits/is_object.md)である場合、Cpp17MoveConstructible要件を満たすこと + - `FD`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと + - `BoundArgs`のそれぞれの型`Ti`が[オブジェクト型](/reference/type_traits/is_object.md)である場合、[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと - (2) : - - `BoundArgs`のそれぞれの型`Ti`がCpp17MoveConstructible要件を満たすこと + - `BoundArgs`のそれぞれの型`Ti`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと ## 適格要件 diff --git a/reference/functional/bind_front.md b/reference/functional/bind_front.md index 274f30d958..b25866c437 100644 --- a/reference/functional/bind_front.md +++ b/reference/functional/bind_front.md @@ -55,10 +55,10 @@ auto f3 = bind_front(&Strategy::process, Strategy{}); [`decay_t`](/reference/type_traits/decay.md)``を適用した型を`FD`、[`decay_t`](/reference/type_traits/decay.md)`...`を適用した型パラメータパックを`BoundArgs`として - (1) : - - `FD`がCpp17MoveConstructible要件を満たすこと - - `BoundArgs`のそれぞれの型`Ti`が[オブジェクト型](/reference/type_traits/is_object.md)である場合、Cpp17MoveConstructible要件を満たすこと + - `FD`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと + - `BoundArgs`のそれぞれの型`Ti`が[オブジェクト型](/reference/type_traits/is_object.md)である場合、[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと - (2) : - - `BoundArgs`のそれぞれの型`Ti`がCpp17MoveConstructible要件を満たすこと + - `BoundArgs`のそれぞれの型`Ti`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと ## 適格要件 diff --git a/reference/functional/copyable_function/op_constructor.md b/reference/functional/copyable_function/op_constructor.md index 4f929ad3d5..b429978dc7 100644 --- a/reference/functional/copyable_function/op_constructor.md +++ b/reference/functional/copyable_function/op_constructor.md @@ -59,8 +59,8 @@ explicit copyable_function(in_place_type_t, initializer_list, Args&&...); ## 事前条件 -- (5) : `VT`型を`decay_t`としたとき、`VT`がCpp17Destructible要件およびCpp17CopyConstructible要件を満たすこと。 -- (6), (7) : `VT`型を`decay_t`としたとき、`VT`がCpp17Destructible要件およびCpp17CopyConstructible要件を満たすこと。 +- (5) : `VT`型を`decay_t`としたとき、`VT`が[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件および[`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink)要件を満たすこと。 +- (6), (7) : `VT`型を`decay_t`としたとき、`VT`が[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件および[`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink)要件を満たすこと。 ## 効果 diff --git a/reference/functional/move_only_function/op_constructor.md b/reference/functional/move_only_function/op_constructor.md index 428e905cc8..79cc4e32a6 100644 --- a/reference/functional/move_only_function/op_constructor.md +++ b/reference/functional/move_only_function/op_constructor.md @@ -55,11 +55,11 @@ explicit move_only_function(in_place_type_t, initializer_list, Args&&...); ## 事前条件 - (4) : `VT`型を`decay_t`としたとき - - `VT`がCpp17Destructible要件を満たすこと。 - - [`is_move_constructible_v`](/reference/type_traits/is_move_constructible.md)``が`true`の場合、`VT`がCpp17MoveConstructible要件を満たすこと。 + - `VT`が[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件を満たすこと。 + - [`is_move_constructible_v`](/reference/type_traits/is_move_constructible.md)``が`true`の場合、`VT`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと。 - (5), (6) : `VT`型を`decay_t`としたとき - - `VT`がCpp17Destructible要件を満たすこと。 - - [`is_move_constructible_v`](/reference/type_traits/is_move_constructible.md)``が`true`の場合、`VT`がCpp17MoveConstructible要件を満たすこと。 + - `VT`が[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件を満たすこと。 + - [`is_move_constructible_v`](/reference/type_traits/is_move_constructible.md)``が`true`の場合、`VT`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと。 ## 効果 diff --git a/reference/functional/not_fn.md b/reference/functional/not_fn.md index fb844f846b..4454f4c12a 100644 --- a/reference/functional/not_fn.md +++ b/reference/functional/not_fn.md @@ -22,7 +22,7 @@ namespace std { ## 事前条件 -- (1) : [`decay_t`](/reference/type_traits/decay.md)``を適用した型を`FD`として、`FD`がCpp17MoveConstructible要件を満たすこと +- (1) : [`decay_t`](/reference/type_traits/decay.md)``を適用した型を`FD`として、`FD`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと ## 適格要件 diff --git a/reference/future/future.md b/reference/future/future.md index 9132ff1b7b..3ce0c0931c 100644 --- a/reference/future/future.md +++ b/reference/future/future.md @@ -16,7 +16,7 @@ namespace std { ## 適格要件 -- C++23 : `R`が参照型でも`void`でもない場合、`R`はデストラクト可能 (`Cpp17Destructible`) なオブジェクト型であること。配列型・関数型は不適格である。 +- C++23 : `R`が参照型でも`void`でもない場合、`R`はデストラクト可能 ([`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)) なオブジェクト型であること。配列型・関数型は不適格である。 ## メンバ関数 @@ -109,4 +109,4 @@ int main() ## 参照 - [LWG Issue 3466. Specify the requirements for `promise`/`future`/`shared_future` consistently](https://cplusplus.github.io/LWG/issue3466) - - C++23で、テンプレート引数`R`がCpp17Destructible要件を満たすオブジェクト型でなければならないという要件が一貫して規定された(配列型・関数型は不適格) + - C++23で、テンプレート引数`R`が[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件を満たすオブジェクト型でなければならないという要件が一貫して規定された(配列型・関数型は不適格) diff --git a/reference/future/promise.md b/reference/future/promise.md index f7b3126cef..afd3534f49 100644 --- a/reference/future/promise.md +++ b/reference/future/promise.md @@ -23,7 +23,7 @@ namespace std { ## 適格要件 -- C++23 : `R`が参照型でも`void`でもない場合、`R`はデストラクト可能 (`Cpp17Destructible`) なオブジェクト型であること。配列型・関数型は不適格である。 +- C++23 : `R`が参照型でも`void`でもない場合、`R`はデストラクト可能 ([`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)) なオブジェクト型であること。配列型・関数型は不適格である。 ## メンバ関数 @@ -128,4 +128,4 @@ int main() ## 参照 - [LWG Issue 3466. Specify the requirements for `promise`/`future`/`shared_future` consistently](https://cplusplus.github.io/LWG/issue3466) - - C++23で、テンプレート引数`R`がCpp17Destructible要件を満たすオブジェクト型でなければならないという要件が一貫して規定された(配列型・関数型は不適格) + - C++23で、テンプレート引数`R`が[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件を満たすオブジェクト型でなければならないという要件が一貫して規定された(配列型・関数型は不適格) diff --git a/reference/future/shared_future.md b/reference/future/shared_future.md index f3d024def6..f0856872f8 100644 --- a/reference/future/shared_future.md +++ b/reference/future/shared_future.md @@ -16,7 +16,7 @@ namespace std { ## 適格要件 -- C++23 : `R`が参照型でも`void`でもない場合、`R`はデストラクト可能 (`Cpp17Destructible`) なオブジェクト型であること。配列型・関数型は不適格である。 +- C++23 : `R`が参照型でも`void`でもない場合、`R`はデストラクト可能 ([`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)) なオブジェクト型であること。配列型・関数型は不適格である。 ## メンバ関数 @@ -112,4 +112,4 @@ int main() ## 参照 - [LWG Issue 3466. Specify the requirements for `promise`/`future`/`shared_future` consistently](https://cplusplus.github.io/LWG/issue3466) - - C++23で、テンプレート引数`R`がCpp17Destructible要件を満たすオブジェクト型でなければならないという要件が一貫して規定された(配列型・関数型は不適格) + - C++23で、テンプレート引数`R`が[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件を満たすオブジェクト型でなければならないという要件が一貫して規定された(配列型・関数型は不適格) diff --git a/reference/generator/generator.md b/reference/generator/generator.md index ba1f6034f9..a0d015f536 100644 --- a/reference/generator/generator.md +++ b/reference/generator/generator.md @@ -111,7 +111,7 @@ C++コンパイラによっては、ジェネレータコルーチンに関す - [`common_reference_with`](/reference/concepts/common_reference_with.md)`` - [`common_reference_with`](/reference/concepts/common_reference_with.md)`` -テンプレートパラメータ`Allocator`が`void`ではない場合、`Cpp17Allocator`の要件を満たすこと。 +テンプレートパラメータ`Allocator`が`void`ではない場合、[`Cpp17Allocator`](/requirements/Cpp17Allocator.md)の要件を満たすこと。 ## メンバ関数 diff --git a/reference/hazard_pointer/hazard_pointer_obj_base.md b/reference/hazard_pointer/hazard_pointer_obj_base.md index c3b40cfb0e..53a6453317 100644 --- a/reference/hazard_pointer/hazard_pointer_obj_base.md +++ b/reference/hazard_pointer/hazard_pointer_obj_base.md @@ -31,7 +31,7 @@ struct Data : std::hazard_pointer_obj_base { ## 適格要件 - `T`は不完全型でもよいが、特殊化された`hazard_pointer_obj_base`のメンバが参照されるまでに完全型とすること。 - `D`は関数オブジェクト型であり、`D`型の値`d`と`T*`型の値`ptr`に対して式`d(ptr)`が有効であること。 -- `D`型は要件 Cpp17DefaultConstructible および Cpp17MoveAssignable を満たすこと。 +- `D`型は要件 [`Cpp17DefaultConstructible`](/requirements/Cpp17DefaultConstructible.md.nolink) および [`Cpp17MoveAssignable`](/requirements/Cpp17MoveAssignable.md.nolink) を満たすこと。 ## メンバ関数 diff --git a/reference/inplace_vector/inplace_vector/swap.md b/reference/inplace_vector/inplace_vector/swap.md index ad52ee02a4..59246755c6 100644 --- a/reference/inplace_vector/inplace_vector/swap.md +++ b/reference/inplace_vector/inplace_vector/swap.md @@ -16,7 +16,7 @@ constexpr void swap(inplace_vector& x) ## 事前条件 -- 型`T`がCpp17MoveConstructible要件を満たすこと。 +- 型`T`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと。 - `M`を`min(`[`size()`](size.md)`, x.`[`size()`](size.md)`)`とする。`0`以上`M`未満の各整数`n`について、`(*this)[n]`と`x[n]`がswap可能であること。 @@ -79,4 +79,4 @@ v2: 1 2 3 ## 参照 - [P0843R14 `inplace_vector`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p0843r14.html) - [LWG Issue 4151. Precondition of `inplace_vector::swap`](https://cplusplus.github.io/LWG/issue4151) - - C++26で、要素型`T`のCpp17MoveConstructible要件と、対応する要素がswap可能であることの事前条件が明記された + - C++26で、要素型`T`の[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件と、対応する要素がswap可能であることの事前条件が明記された diff --git a/reference/iterator/istream_iterator.md b/reference/iterator/istream_iterator.md index 0cb0a04df2..be2b18dfec 100644 --- a/reference/iterator/istream_iterator.md +++ b/reference/iterator/istream_iterator.md @@ -23,7 +23,7 @@ namespace std { ## 要件 -- 型`T`が、デフォルト構築可能(*Cpp17DefaultConstructible*)、コピー構築可能(*Cpp17CopyConstructible*)、かつコピー代入可能(*Cpp17CopyAssignable*)の要件を満たすこと。 +- 型`T`が、デフォルト構築可能([`Cpp17DefaultConstructible`](/requirements/Cpp17DefaultConstructible.md.nolink))、コピー構築可能([`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink))、かつコピー代入可能([`Cpp17CopyAssignable`](/requirements/Cpp17CopyAssignable.md.nolink))の要件を満たすこと。 ## メンバ関数 diff --git a/reference/map/multimap/insert.md b/reference/map/multimap/insert.md index 654e1873af..4a7490863a 100644 --- a/reference/map/multimap/insert.md +++ b/reference/map/multimap/insert.md @@ -58,7 +58,7 @@ constexpr iterator insert(const_iterator hint, node_type&& nh); // (10) C++26 - (1), (4) : `value_type` は、コンテナに対してコピー挿入可能でなければならない。 - (2), (5) : `value_type` は、コンテナに対してムーブ挿入可能でなければならない。 - (3), (6) : `P`から`value_type`が構築可能であること。 -- (7), (8) : イテレータ範囲`[first, last)`の各イテレータが、`*this` の要素を指さないこと。また `value_type` は `*first` から`multimap` コンテナへの`Cpp17EmplaceConstructible`であること。 +- (7), (8) : イテレータ範囲`[first, last)`の各イテレータが、`*this` の要素を指さないこと。また `value_type` は `*first` から`multimap` コンテナへの[`Cpp17EmplaceConstructible`](/requirements/Cpp17EmplaceConstructible.md.nolink)であること。 - (9), (10) : `nh` は空である、または、`(*this).get_allocator() == nh.get_allocator()`である。 ## 効果 diff --git a/reference/memory/allocate_shared.md b/reference/memory/allocate_shared.md index 81e413a0f0..7b6682847f 100644 --- a/reference/memory/allocate_shared.md +++ b/reference/memory/allocate_shared.md @@ -63,7 +63,7 @@ namespace std { ## 要件 -テンプレートパラメータ`A`は`Cpp17Allocator`の要件を満たす。 +テンプレートパラメータ`A`は[`Cpp17Allocator`](/requirements/Cpp17Allocator.md)の要件を満たす。 ## 効果 diff --git a/reference/memory/allocate_shared_for_overwrite.md b/reference/memory/allocate_shared_for_overwrite.md index 69304f8188..9d9dd68f58 100644 --- a/reference/memory/allocate_shared_for_overwrite.md +++ b/reference/memory/allocate_shared_for_overwrite.md @@ -28,7 +28,7 @@ namespace std { ## 要件 -テンプレートパラメータ`A`は`Cpp17Allocator`の要件を満たす。 +テンプレートパラメータ`A`は[`Cpp17Allocator`](/requirements/Cpp17Allocator.md)の要件を満たす。 ## 効果 diff --git a/reference/memory/allocator.md b/reference/memory/allocator.md index 982969d91a..e9ca090599 100644 --- a/reference/memory/allocator.md +++ b/reference/memory/allocator.md @@ -135,6 +135,11 @@ int main(int argc, char** argv) { - [GCC](/implementation.md#gcc): - [Visual C++](/implementation.md#visual_cpp): 2012, 2013 +## 関連項目 +- [`Cpp17Allocator`](/requirements/Cpp17Allocator.md) + - 自作のアロケータを実装する場合は、この要件を満たす必要がある + + ## 参照 - [A visitor’s guide to C++ allocators](https://htmlpreview.github.io/?https://github.com/google/cxx-std-draft/blob/allocator-paper/allocator_user_guide.html) - [LWG #2103 - `std::allocator_traits>::propagate_on_container_move_assignment`](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2103) diff --git a/reference/memory/allocator_traits.md b/reference/memory/allocator_traits.md index fe47f359b6..c1289145e7 100644 --- a/reference/memory/allocator_traits.md +++ b/reference/memory/allocator_traits.md @@ -205,6 +205,12 @@ int main() { - [Clang](/implementation.md#clang): 3.0 [mark verified] - [Visual C++](/implementation.md#visual_cpp): 2012 [mark verified], 2013 [mark verified] +## 関連項目 +- [`Cpp17Allocator`](/requirements/Cpp17Allocator.md) + - 自作のアロケータを実装する場合は、この要件を満たす必要がある + - 要件のうち省略した項目は、本クラスが既定の定義を与える + + ## 参照 - [Allocators@C++11 - Cryolite](http://www.slideshare.net/Cryolite/allocator11final) - [A visitor’s guide to C++ allocators](https://htmlpreview.github.io/?https://github.com/google/cxx-std-draft/blob/allocator-paper/allocator_user_guide.html) diff --git a/reference/memory/indirect.md b/reference/memory/indirect.md index 5546718048..40135c36ea 100644 --- a/reference/memory/indirect.md +++ b/reference/memory/indirect.md @@ -39,7 +39,7 @@ namespace std { ## テンプレートパラメータ制約 -- `Allocator`はCpp17Allocator要件を満たすこと +- `Allocator`は[`Cpp17Allocator`](/requirements/Cpp17Allocator.md)要件を満たすこと - [`std::allocator_traits`](/reference/memory/allocator_traits.md)`::value_type`が`T`と同じ型であること diff --git a/reference/memory/indirect/swap.md b/reference/memory/indirect/swap.md index 9e23a5786b..1229b61924 100644 --- a/reference/memory/indirect/swap.md +++ b/reference/memory/indirect/swap.md @@ -14,7 +14,7 @@ constexpr void swap(indirect& other) noexcept(see below); ## 事前条件 -[`allocator_traits`](/reference/memory/allocator_traits.md)`::propagate_on_container_swap::value`が`true`の場合、`Allocator`はCpp17Swappable要件を満たすこと。そうでない場合、`get_allocator() == other.get_allocator()`が`true`であること。 +[`allocator_traits`](/reference/memory/allocator_traits.md)`::propagate_on_container_swap::value`が`true`の場合、`Allocator`は[`Cpp17Swappable`](/requirements/Cpp17Swappable.md.nolink)要件を満たすこと。そうでない場合、`get_allocator() == other.get_allocator()`が`true`であること。 ## 効果 diff --git a/reference/memory/inout_ptr_t.md b/reference/memory/inout_ptr_t.md index da269f0e8a..66246cf101 100644 --- a/reference/memory/inout_ptr_t.md +++ b/reference/memory/inout_ptr_t.md @@ -22,7 +22,7 @@ namespace std { ## テンプレートパラメータ制約 -`Pointer`はCpp17NullablePointer要件を満たすこと +`Pointer`は[`Cpp17NullablePointer`](/requirements/Cpp17NullablePointer.md.nolink)要件を満たすこと ## 適格要件 diff --git a/reference/memory/out_ptr_t.md b/reference/memory/out_ptr_t.md index c7e6c5b2ac..c783afa333 100644 --- a/reference/memory/out_ptr_t.md +++ b/reference/memory/out_ptr_t.md @@ -22,7 +22,7 @@ C++標準スマートポインタ[`std::shared_ptr`](shared_ptr.md)や[`std::uni ## テンプレートパラメータ制約 -`Pointer`はCpp17NullablePointer要件を満たすこと +`Pointer`は[`Cpp17NullablePointer`](/requirements/Cpp17NullablePointer.md.nolink)要件を満たすこと ## 適格要件 diff --git a/reference/memory/polymorphic.md b/reference/memory/polymorphic.md index ad7a74aed6..33d9a891ee 100644 --- a/reference/memory/polymorphic.md +++ b/reference/memory/polymorphic.md @@ -35,7 +35,7 @@ namespace std { ## テンプレートパラメータ制約 -- `Allocator`はCpp17Allocator要件を満たすこと。 +- `Allocator`は[`Cpp17Allocator`](/requirements/Cpp17Allocator.md)要件を満たすこと。 - [`allocator_traits`](/reference/memory/allocator_traits.md)`::value_type`が`T`と同じ型であること diff --git a/reference/memory/polymorphic/swap.md b/reference/memory/polymorphic/swap.md index 98c231e536..da4cc4af63 100644 --- a/reference/memory/polymorphic/swap.md +++ b/reference/memory/polymorphic/swap.md @@ -14,7 +14,7 @@ constexpr void swap(polymorphic& other) noexcept(see below); ## 事前条件 -[`allocator_traits`](/reference/memory/allocator_traits.md)`::propagate_on_container_swap::value`が`true`の場合、`Allocator`は*Cpp17Swappable*要件を満たすこと。そうでない場合、`get_allocator() == other.get_allocator()`が`true`であること。 +[`allocator_traits`](/reference/memory/allocator_traits.md)`::propagate_on_container_swap::value`が`true`の場合、`Allocator`は[`Cpp17Swappable`](/requirements/Cpp17Swappable.md.nolink)要件を満たすこと。そうでない場合、`get_allocator() == other.get_allocator()`が`true`であること。 ## 効果 diff --git a/reference/memory/raw_storage_iterator/op_assign.md b/reference/memory/raw_storage_iterator/op_assign.md index ccbdb19be0..a6ac434a95 100644 --- a/reference/memory/raw_storage_iterator/op_assign.md +++ b/reference/memory/raw_storage_iterator/op_assign.md @@ -19,8 +19,8 @@ raw_storage_iterator& operator=(T&& element); // (2) C++17 ## テンプレートパラメータ制約 -- (1) : 型`T`がコピー構築可能(Cpp17CopyConstructible)であること -- (2) : 型`T`がムーブ構築可能(Cpp17MoveConstructible)であること +- (1) : 型`T`がコピー構築可能([`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink))であること +- (2) : 型`T`がムーブ構築可能([`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink))であること ## 効果 diff --git a/reference/memory_resource/memory_resource/allocate.md b/reference/memory_resource/memory_resource/allocate.md index 14589e5723..eb504e9027 100644 --- a/reference/memory_resource/memory_resource/allocate.md +++ b/reference/memory_resource/memory_resource/allocate.md @@ -89,6 +89,6 @@ int main(){ - C++20で`[[nodiscard]]`が付加された - [LWG Issue 2843. Unclear behavior of `std::pmr::memory_resource::do_allocate()`](https://wg21.cmeerw.net/lwg/issue2843) - [LWG Issue 3471. `polymorphic_allocator::allocate` does not satisfy `Cpp17Allocator` requirements](https://cplusplus.github.io/LWG/issue3471) - - C++23で、確保した領域内でオブジェクトが暗黙的に生成され、生成されたオブジェクトへのポインタを返すことが明確化され、`Cpp17Allocator`要件を満たすようになった + - C++23で、確保した領域内でオブジェクトが暗黙的に生成され、生成されたオブジェクトへのポインタを返すことが明確化され、[`Cpp17Allocator`](/requirements/Cpp17Allocator.md)要件を満たすようになった - [P2422R1 Remove `nodiscard` annotations from the standard library specification](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2422r1.html) - C++26で`[[nodiscard]]`指定が削除された diff --git a/reference/ranges/to.md b/reference/ranges/to.md index 667d3a2e34..fdecc07f25 100644 --- a/reference/ranges/to.md +++ b/reference/ranges/to.md @@ -232,7 +232,7 @@ int main() { - [P2846R6 `reserve_hint`: Eagerly reserving memory for not-quite-sized lazy ranges](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2846r6.pdf) - C++26で要素数の事前確保に[`ranges::size`](size.md)の代わりに[`ranges::reserve_hint`](reserve_hint.md)を使用するよう変更 - [LWG Issue 3733. `ranges::to` misuses *cpp17-input-iterator*](https://cplusplus.github.io/LWG/issue3733) - - C++23で、Cpp17InputIterator判定に説明専用コンセプト`cpp17-input-iterator`を使用するのをやめ、`iterator_traits>::iterator_category`が`input_iterator_tag`から派生する有効な型であることを判定するよう修正された([`common_iterator`](/reference/iterator/common_iterator.md)のように`iterator_traits`の特殊化を持つイテレータで正しく判定されるようにするため) + - C++23で、[`Cpp17InputIterator`](/requirements/Cpp17InputIterator.md.nolink)判定に説明専用コンセプト`cpp17-input-iterator`を使用するのをやめ、`iterator_traits>::iterator_category`が`input_iterator_tag`から派生する有効な型であることを判定するよう修正された([`common_iterator`](/reference/iterator/common_iterator.md)のように`iterator_traits`の特殊化を持つイテレータで正しく判定されるようにするため) - [LWG Issue 3743. `ranges::to`'s `reserve` may be ill-formed](https://cplusplus.github.io/LWG/issue3743) - C++23で、`reserve`に渡す値を`static_cast>(ranges::size(r))`と明示キャストするよう修正され、整数クラス型を返す`ranges::size`が暗黙変換できず不適格になる問題が解消された - [LWG Issue 3785. `ranges::to` is over-constrained on the destination type being a range](https://cplusplus.github.io/LWG/issue3785) diff --git a/reference/rcu/rcu_domain.md b/reference/rcu/rcu_domain.md index 496eb7c466..ae8c205517 100644 --- a/reference/rcu/rcu_domain.md +++ b/reference/rcu/rcu_domain.md @@ -13,7 +13,7 @@ namespace std { ## 概要 RCU同期メカニズムで保護する共有データに対応付ける、RCUドメインを表現する。 -`rcu_domain`クラスは Cpp17Lockable 要件を満たし、共有データの読み取りをおこなうRCU保護区間を表現する。 +`rcu_domain`クラスは [`Cpp17Lockable`](/requirements/Cpp17Lockable.md.nolink) 要件を満たし、共有データの読み取りをおこなうRCU保護区間を表現する。 RCU保護区間は[`lock`](rcu_domain/lock.md)呼び出しから[`unlock`](rcu_domain/unlock.md)呼び出しのまでの区間であり、RCUドメインに対して同一スレッド上でのRCU保護区間は入れ子になってもよい。 diff --git a/reference/rcu/rcu_obj_base.md b/reference/rcu/rcu_obj_base.md index 06728bf82c..f6ecbc9f26 100644 --- a/reference/rcu/rcu_obj_base.md +++ b/reference/rcu/rcu_obj_base.md @@ -21,7 +21,7 @@ RCU機構の保護対象とする型の基底クラス。 ## 適格要件 - `T`は不完全型でもよいが、特殊化された`rcu_obj_base`のメンバが参照されるまでに完全型とすること。 - `D`は関数オブジェクト型であり、`D`型の値`d`と`T*`型の値`ptr`に対して式`d(ptr)`が有効であること。 -- `D`型は要件 Cpp17DefaultConstructible およ Cpp17MoveAssignable を満たすこと。 +- `D`型は要件 [`Cpp17DefaultConstructible`](/requirements/Cpp17DefaultConstructible.md.nolink) およ [`Cpp17MoveAssignable`](/requirements/Cpp17MoveAssignable.md.nolink) を満たすこと。 ## メンバ関数 diff --git a/reference/rcu/rcu_retire.md b/reference/rcu/rcu_retire.md index 051e531376..a4639472ef 100644 --- a/reference/rcu/rcu_retire.md +++ b/reference/rcu/rcu_retire.md @@ -25,7 +25,7 @@ RCU機構により保護されるオブジェクト回収をスケジュール ## 事前条件 -`D`はCpp17MoveCosntructible要件およびCpp17Destructible要件をみたすこと。 +`D`は[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件および[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件をみたすこと。 ## 効果 diff --git a/reference/source_location/source_location.md b/reference/source_location/source_location.md index 1820898d35..7e3fec8ebc 100644 --- a/reference/source_location/source_location.md +++ b/reference/source_location/source_location.md @@ -29,7 +29,7 @@ namespace std { ## 概要 `source_location` は、ソースコード上の位置を表す。 -この型は要件Cpp17DefaultConstructible、Cpp17CopyConstructible、 Cpp17CopyAssignable、Cpp17Destructibleを満たす。 +この型は要件[`Cpp17DefaultConstructible`](/requirements/Cpp17DefaultConstructible.md.nolink)、[`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink)、 [`Cpp17CopyAssignable`](/requirements/Cpp17CopyAssignable.md.nolink)、[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)を満たす。 ## メンバ関数 diff --git a/reference/thread/jthread/op_constructor.md b/reference/thread/jthread/op_constructor.md index 0e9e9a8c24..3471afce04 100644 --- a/reference/thread/jthread/op_constructor.md +++ b/reference/thread/jthread/op_constructor.md @@ -36,7 +36,7 @@ jthread(jthread&&) noexcept; // (4) C++20 ## テンプレートパラメータ制約 - (2) : - [`remove_cvref_t`](/reference/type_traits/remove_cvref.md)``が`jthread`ではないこと - - [`decay_t`](/reference/type_traits/decay.md)``および[`decay_t`](/reference/type_traits/decay.md)``の各型がCpp17MoveConstructible要件を満たすこと + - [`decay_t`](/reference/type_traits/decay.md)``および[`decay_t`](/reference/type_traits/decay.md)``の各型が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと ## 適格要件 diff --git a/reference/variant/variant/swap.md b/reference/variant/variant/swap.md index 19a8a1ada7..9e98030991 100644 --- a/reference/variant/variant/swap.md +++ b/reference/variant/variant/swap.md @@ -19,7 +19,7 @@ constexpr void swap(variant& rhs) noexcept(see below); // C++23 ## 事前条件 -- `Types...`に含まれる全ての型`Ti`が、交換可能(Cpp17Swappable)の要件を満たすこと +- `Types...`に含まれる全ての型`Ti`が、交換可能([`Cpp17Swappable`](/requirements/Cpp17Swappable.md.nolink))の要件を満たすこと ## 効果 diff --git a/requirements.md b/requirements.md new file mode 100644 index 0000000000..47d4941aea --- /dev/null +++ b/requirements.md @@ -0,0 +1,186 @@ +# 標準ライブラリ要件 + +ここでは、C++標準ライブラリの要件 (requirements) を解説する。 + +要件とは、ライブラリがユーザーの型に対して要求する性質のことである。たとえば[`std::vector`](/reference/vector/vector.md)の要素型には「コンテナから削除できること」が要求され、[`std::map`](/reference/map/map.md)のキー型には「比較できること」が要求される。 + +要件を知る必要があるのは、おもに以下の場合である。 + +- 標準ライブラリに渡す自作の型が、どの性質を満たす必要があるかを確認する +- 標準ライブラリと同じように使えるコンテナ・アロケータ・イテレータ・クロックなどを自作する + +標準ライブラリの要件には、コンセプトとして定義されるものと、規格の文章と表によって定義されるものがある。コンセプトとして定義される要件は、[``](/reference/concepts.md)・[``](/reference/iterator.md)・[``](/reference/ranges.md)などが提供する機能であり、コンパイル時に検査できるため、各コンセプトのリファレンスページで解説する。ここでは、コンセプトとして定義されていない要件を解説する。これらの要件は、満たしていなくてもコンパイルエラーにならないことがあり、満たさない場合の動作は保証されない。 + +`Cpp17`で始まる名前の要件は、C++20で同名のコンセプトが追加されたことにともない、区別のために接頭辞が付けられたものである。要件そのものはC++17以前から存在する。名前が似ていても要求する内容は同一ではないため、コンセプトを満たす型がその要件を満たすとは限らない。 + + +## 型とその式に対する要件 +ライブラリ全体で使用される、基本的な要件である。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`Cpp17EqualityComparable`](requirements/Cpp17EqualityComparable.md) | `==`による等値比較ができる | +| [`Cpp17LessThanComparable`](requirements/Cpp17LessThanComparable.md.nolink) | `<`による大小比較ができる | +| [`Cpp17DefaultConstructible`](requirements/Cpp17DefaultConstructible.md.nolink) | デフォルト構築ができる | +| [`Cpp17MoveConstructible`](requirements/Cpp17MoveConstructible.md.nolink) | ムーブ構築ができる | +| [`Cpp17CopyConstructible`](requirements/Cpp17CopyConstructible.md.nolink) | コピー構築ができる | +| [`Cpp17MoveAssignable`](requirements/Cpp17MoveAssignable.md.nolink) | ムーブ代入ができる | +| [`Cpp17CopyAssignable`](requirements/Cpp17CopyAssignable.md.nolink) | コピー代入ができる | +| [`Cpp17Destructible`](requirements/Cpp17Destructible.md.nolink) | 破棄ができる | +| [`Cpp17Swappable`](requirements/Cpp17Swappable.md.nolink) | 2つのオブジェクトを交換できる | +| [`Cpp17ValueSwappable`](requirements/Cpp17ValueSwappable.md.nolink) | イテレータが指す先の値を交換できる | +| [`Cpp17NullablePointer`](requirements/Cpp17NullablePointer.md.nolink) | ヌル値をもつポインタのように扱える | +| [`Cpp17Hash`](requirements/Cpp17Hash.md.nolink) | ハッシュ値を求める関数オブジェクトである | + + +## 型特性の要件 +[``](/reference/type_traits.md)の型特性が満たす要件である。自作の型特性を標準ライブラリと同じ形式で定義する場合にも使用する。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`Cpp17UnaryTypeTrait`](requirements/Cpp17UnaryTypeTrait.md.nolink) | 1つの型の性質を表す型特性である | +| [`Cpp17BinaryTypeTrait`](requirements/Cpp17BinaryTypeTrait.md.nolink) | 2つの型の関係を表す型特性である | +| [`Cpp17TransformationTrait`](requirements/Cpp17TransformationTrait.md.nolink) | 型を変換する型特性である | + + +## 列挙型・ビットマスク型の要件 +標準ライブラリが提供する型のうち、値の集合を表す型が満たす要件である。処理系がこれらの型をどう実装してよいかを規定するものであり、ユーザーがこの要件を満たす型を書くことは想定されていない。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`列挙型`](requirements/enumerated_type.md.nolink) | 入出力・正規表現ライブラリで使用される、列挙型として実装できる型である | +| [`ビットマスク型`](requirements/bitmask_type.md.nolink) | ビット単位の論理演算によって値を組み合わせられる型である。列挙型・整数型・[`std::bitset`](/reference/bitset/bitset.md)のいずれでも実装できる | + + +## メモリ管理の要件 +自作のアロケータを標準ライブラリのコンテナに渡す場合に必要な要件である。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`Cpp17Allocator`](requirements/Cpp17Allocator.md) | 記憶域の確保・解放を行うアロケータである | +| [`アロケータの完全性要件`](requirements/allocator_completeness.md.nolink) | 不完全型に対してアロケータを使用できる | + + +## イテレータの要件 +コンセプトによるイテレータの分類 ([`std::input_iterator`](/reference/iterator/input_iterator.md)など) とは別に、C++17以前から存在するイテレータの分類である。イテレータを引数に取るアルゴリズムの多くは、いまもこの要件で規定されている。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`Cpp17Iterator`](requirements/Cpp17Iterator.md.nolink) | すべてのイテレータが満たす基本要件 | +| [`Cpp17InputIterator`](requirements/Cpp17InputIterator.md.nolink) | 読み取り方向に1回だけ走査できる | +| [`Cpp17OutputIterator`](requirements/Cpp17OutputIterator.md.nolink) | 書き込み方向に1回だけ走査できる | +| [`Cpp17ForwardIterator`](requirements/Cpp17ForwardIterator.md.nolink) | 前方に何度でも走査できる | +| [`Cpp17BidirectionalIterator`](requirements/Cpp17BidirectionalIterator.md.nolink) | 前方・後方に走査できる | +| [`Cpp17RandomAccessIterator`](requirements/Cpp17RandomAccessIterator.md.nolink) | 任意の位置へ定数時間で移動できる | + + +## コンテナの要件 +自作のコンテナを標準ライブラリのアルゴリズムやコンテナアダプタから使えるようにする場合に必要な要件である。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`コンテナ要件`](requirements/container.md.nolink) | すべてのコンテナが満たす基本要件 | +| [`逆順可能コンテナ要件`](requirements/reversible_container.md.nolink) | 逆順に走査できるコンテナの要件 | +| [`オプショナルなコンテナ操作の要件`](requirements/optional_container_operations.md.nolink) | 提供する場合には定められた意味をもつ操作の要件 | +| [`アロケータ対応コンテナの要件`](requirements/allocator_aware_container.md.nolink) | アロケータを受け取り、要素の構築・破棄に使うコンテナの要件 | +| [`シーケンスコンテナ要件`](requirements/sequence_container.md.nolink) | 要素を一列に保持するコンテナの要件 | +| [`連想コンテナ要件`](requirements/associative_container.md.nolink) | キーの比較によって要素を保持するコンテナの要件 | +| [`非順序連想コンテナ要件`](requirements/unordered_associative_container.md.nolink) | キーのハッシュ値によって要素を保持するコンテナの要件 | + + +### コンテナの要素に対する要件 +コンテナが要素型に対して要求する要件である。どの操作を使用するかによって、要求される要件が異なる。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`Cpp17Erasable`](requirements/Cpp17Erasable.md.nolink) | コンテナから要素を破棄できる | +| [`Cpp17DefaultInsertable`](requirements/Cpp17DefaultInsertable.md.nolink) | 値を指定せずに要素を挿入できる | +| [`Cpp17MoveInsertable`](requirements/Cpp17MoveInsertable.md.nolink) | ムーブによって要素を挿入できる | +| [`Cpp17CopyInsertable`](requirements/Cpp17CopyInsertable.md.nolink) | コピーによって要素を挿入できる | +| [`Cpp17EmplaceConstructible`](requirements/Cpp17EmplaceConstructible.md.nolink) | 引数から要素を直接構築できる | + + +### 多次元配列ビューの要件 +[`std::mdspan`](/reference/mdspan/mdspan.md)に渡す、レイアウトとアクセス方法をカスタマイズするための要件である。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`レイアウトマッピング要件`](requirements/layout_mapping.md.nolink) | 多次元のインデックスを1次元の位置へ対応付ける | +| [`レイアウトマッピングポリシー要件`](requirements/layout_mapping_policy.md.nolink) | 要素数からレイアウトマッピングを決定する | +| [`アクセサポリシー要件`](requirements/accessor_policy.md.nolink) | 位置から要素を参照する方法を提供する | +| [`スライス可能なレイアウトマッピング要件`](requirements/sliceable_layout_mapping.md.nolink) | 部分多次元配列を取り出せるレイアウトマッピングである | + + +## アルゴリズムの要件 +アルゴリズムに渡す関数オブジェクトが満たすべき要件である。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`並列アルゴリズムに渡す関数オブジェクトの要件`](requirements/parallel_algorithm_user.md.nolink) | 並列に実行されるため、データ競合を起こしてはならない | +| [`安定なアルゴリズムの要件`](requirements/stable_algorithm.md.nolink) | 等価な要素の相対順序を保つ | + + +## 時間の要件 +自作のクロックを[``](/reference/chrono.md)の機能に渡す場合に必要な要件である。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`Cpp17Clock`](requirements/Cpp17Clock.md.nolink) | 現在時刻を取得できるクロックである | +| [`Cpp17TrivialClock`](requirements/Cpp17TrivialClock.md.nolink) | 時刻の型に対する操作が例外を投げないクロックである | + + +## 並行・並列の要件 +自作のロック機構を[`std::lock_guard`](/reference/mutex/lock_guard.md)などに渡す場合に必要な要件である。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`Cpp17BasicLockable`](requirements/Cpp17BasicLockable.md.nolink) | ロックとアンロックができる | +| [`Cpp17Lockable`](requirements/Cpp17Lockable.md.nolink) | ロックの試行ができる | +| [`Cpp17TimedLockable`](requirements/Cpp17TimedLockable.md.nolink) | 時間制限付きでロックの試行ができる | +| [`Cpp17SharedLockable`](requirements/Cpp17SharedLockable.md.nolink) | 共有ロックができる | +| [`Cpp17SharedTimedLockable`](requirements/Cpp17SharedTimedLockable.md.nolink) | 時間制限付きで共有ロックができる | +| [`mutex型の要件`](requirements/mutex_type.md.nolink) | スレッド間で排他制御を行う | +| [`時間制限付きmutex型の要件`](requirements/timed_mutex_type.md.nolink) | 時間制限付きのロックを提供するmutex型である | +| [`共有mutex型の要件`](requirements/shared_mutex_type.md.nolink) | 共有ロックを提供するmutex型である | +| [`共有時間制限付きmutex型の要件`](requirements/shared_timed_mutex_type.md.nolink) | 時間制限付きの共有ロックを提供するmutex型である | + + +## 数値・乱数の要件 +自作の乱数エンジンや乱数分布を[``](/reference/random.md)の機能に渡す場合に必要な要件である。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`数値型の要件`](requirements/numeric_type.md.nolink) | [`std::complex`](/reference/complex/complex.md)と[`std::valarray`](/reference/valarray/valarray.md)の要素型が満たす要件 | +| [`シード列の要件`](requirements/seed_sequence.md.nolink) | 乱数エンジンの初期状態を生成する | +| [`一様乱数ビット生成器の要件`](requirements/uniform_random_bit_generator.md.nolink) | 一様分布する符号なし整数値を生成する | +| [`乱数エンジンの要件`](requirements/random_number_engine.md.nolink) | 状態を持ち、擬似乱数列を生成する | +| [`乱数エンジンアダプタの要件`](requirements/random_number_engine_adaptor.md.nolink) | ほかの乱数エンジンの出力を加工する | +| [`乱数分布の要件`](requirements/random_number_distribution.md.nolink) | 乱数ビット列を目的の確率分布に変換する | +| [`線形代数の値型の要件`](requirements/linalg_value_type.md.nolink) | [``](/reference/linalg.md)のアルゴリズムが扱う値型の要件 | + + +## 文字列・書式化・正規表現の要件 +文字列・書式化・正規表現の各ライブラリの動作をカスタマイズするための要件である。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`文字特性の要件`](requirements/char_traits.md.nolink) | 文字型に対する操作を提供する | +| [`BasicFormatter`](requirements/BasicFormatter.md.nolink) | 型を書式化する方法を提供する | +| [`Formatter`](requirements/Formatter.md.nolink) | 書式化の指定を解析し、型を書式化する方法を提供する | +| [`正規表現traitsの要件`](requirements/regex_traits.md.nolink) | 正規表現の文字の分類・変換を提供する | + + +## 入出力の要件 +入出力ライブラリが使用する型が満たす要件である。 + +| 名前 | 説明 | +|-----------------------------|--------------------------------------------------| +| [`fpos型の要件`](requirements/fpos_type.md.nolink) | ストリーム中の位置を表す型である | + + +## 運営方針 +requirements階層にあるページは、以下の方針のもとに執筆している。 + +- 要件を満たす型を自作するための情報を提供する + - 要件の内容を列挙するだけでなく、その要件を満たす型の最小限の実装例を示す + - 標準ライブラリのどの機能がその要件を要求するかを記載する diff --git a/requirements/Cpp17Allocator.md b/requirements/Cpp17Allocator.md new file mode 100644 index 0000000000..81c54fae2b --- /dev/null +++ b/requirements/Cpp17Allocator.md @@ -0,0 +1,267 @@ +# Cpp17Allocator +* named requirement[meta id-type] + +## 概要 +`Cpp17Allocator`は、記憶域の確保と解放を行うアロケータの要件である。 + +[`std::vector`](/reference/vector/vector.md)などのコンテナ、[`std::basic_string`](/reference/string/basic_string.md)、文字列ストリーム、[`std::match_results`](/reference/regex/match_results.md)が、記憶域の確保方法を差し替えるためにこの要件を要求する。 + +アロケータは[`std::allocator_traits`](/reference/memory/allocator_traits.md)を介して使用される。要件のほとんどは省略でき、省略した項目は[`std::allocator_traits`](/reference/memory/allocator_traits.md)が既定の定義を与える。そのため、自作のアロケータは少数の項目だけを定義すればよい。 + + +## 要件 +以下では、`T`を要素型、`X`を`T`に対するアロケータ型、`Y`を別の要素型`U`に対するアロケータ型、`a`・`a1`・`a2`を`X`の左辺値、`b`を`Y`の値、`p`を`a.allocate()`で得られたポインタ、`n`を要素数とする。 + +### 省略できない項目 +| 項目 | 説明 | +|--------------------------|----------------------------------------------------------------------| +| `X::value_type` | 要素型。`T`と同じ型であること | +| `a.allocate(n)` | `n`個の`T`を格納できる記憶域を確保し、その先頭を指すポインタを返す | +| `a.deallocate(p, n)` | `a.allocate(n)`で確保した記憶域を解放する | +| `a1 == a2`、`a == b` | 一方で確保した記憶域を他方で解放できるかを表す | + +このほか、`X`が[`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink)要件を満たすこと、および`Y`から`X`を構築できることが要求される。コンテナは内部で要素型とは異なる型 (リストのノードなど) の記憶域を確保するため、要素型を差し替えたアロケータ型から変換できる必要がある。 + +### 省略できる項目 +| 項目 | 既定の定義 | +|-----------------------------------------------|---------------------------------------------------------------| +| `X::pointer` | `T*` | +| `X::const_pointer` | [`pointer_traits`](/reference/memory/pointer_traits.md)`::rebind` | +| `X::void_pointer` | [`pointer_traits`](/reference/memory/pointer_traits.md)`::rebind` | +| `X::const_void_pointer` | [`pointer_traits`](/reference/memory/pointer_traits.md)`::rebind` | +| `X::size_type` | [`make_unsigned_t`](/reference/type_traits/make_unsigned.md)`` | +| `X::difference_type` | [`pointer_traits`](/reference/memory/pointer_traits.md)`::difference_type` | +| `X::rebind::other` | テンプレート引数を`U`に差し替えた型 | +| `a.allocate(n, y)` | `a.allocate(n)` | +| `a.allocate_at_least(n)` | `{a.allocate(n), n}` (C++23) | +| `a.max_size()` | [`numeric_limits`](/reference/limits/numeric_limits.md)`::`[`max()`](/reference/limits/numeric_limits/max.md) `/ sizeof(value_type)` | +| `a.construct(c, args...)` | [`construct_at`](/reference/memory/construct_at.md)`(c,` [`std::forward`](/reference/utility/forward.md)`(args)...)` | +| `a.destroy(c)` | [`destroy_at`](/reference/memory/destroy_at.md)`(c)` | +| `a.select_on_container_copy_construction()` | `a` | +| `X::propagate_on_container_copy_assignment` | [`false_type`](/reference/type_traits/false_type.md) | +| `X::propagate_on_container_move_assignment` | [`false_type`](/reference/type_traits/false_type.md) | +| `X::propagate_on_container_swap` | [`false_type`](/reference/type_traits/false_type.md) | +| `X::is_always_equal` | [`is_empty`](/reference/type_traits/is_empty.md)`::type` | + +`X::pointer`などのポインタ型には、[`Cpp17NullablePointer`](/requirements/Cpp17NullablePointer.md.nolink)要件が要求される。`X::pointer`と`X::const_pointer`には、加えて[`Cpp17RandomAccessIterator`](/requirements/Cpp17RandomAccessIterator.md.nolink)要件が要求される。 + + +## 対応する標準コンセプト +規格は、この要件の最小限の部分を表す説明専用コンセプト`simple-allocator`を定義している。 + +```cpp +namespace std { + template + concept simple-allocator = + requires(Alloc alloc, size_t n) { + { *alloc.allocate(n) } -> same_as; + { alloc.deallocate(alloc.allocate(n), n) }; + } && + copy_constructible && + equality_comparable; +} +``` + +この要件との違いは以下である。 + +- `simple-allocator`は、記憶域の確保・解放、コピー構築、等値比較だけを要求する。要素型を差し替えたアロケータ型からの変換や、省略できる項目の意味は表現しない +- コンテナが要求するのはこの要件であり、`simple-allocator`ではない。`simple-allocator`は[`std::execution::get_allocator()`](/reference/execution/get_allocator.md)が返す型の適格要件のように、アロケータであることだけを判定する箇所で使用される +- `simple-allocator`はコンパイル時に検査できる + +この要件を満たす型は`simple-allocator`のモデルとなる。 + + +## 例 +### アロケータを実装する (最小要件を満たす実装) +省略できない項目だけを定義する。省略した項目は[`std::allocator_traits`](/reference/memory/allocator_traits.md)が既定の定義を与える。 + +```cpp example +#include +#include +#include + +// 最小限のアロケータ。省略した項目はstd::allocator_traitsが既定の定義を与える +template +struct LoggingAllocator { + // 要素型。省略できない + using value_type = T; + + LoggingAllocator() = default; + + // コンテナが内部で別の要素型のアロケータを必要とするため、変換できるようにする + template + LoggingAllocator(const LoggingAllocator&) {} + + // n個分の記憶域を確保する + T* allocate(std::size_t n) + { + std::cout << "allocate " << n << std::endl; + return static_cast(::operator new(n * sizeof(T))); + } + + // allocate()で確保した記憶域を解放する + void deallocate(T* p, std::size_t n) + { + std::cout << "deallocate " << n << std::endl; + ::operator delete(p); + } + + // 一方で確保した記憶域を他方で解放できる場合に等値とする + template + bool operator==(const LoggingAllocator&) const + { + return true; + } +}; + +int main() +{ + std::vector> v; + v.reserve(2); + v.push_back(1); +} +``` +* ::operator new[link /reference/new/op_new.md] +* ::operator delete[link /reference/new/op_delete.md] +* v.reserve[link /reference/vector/vector/reserve.md] +* v.push_back[link /reference/vector/vector/push_back.md] + +#### 出力 +``` +allocate 2 +deallocate 2 +``` + +### アロケータを実装する (要件を完全に満たす実装) +省略できる項目もすべて明示的に定義すると、以下のようになる。各項目には既定の定義と同じ内容を書いているため、動作は最小要件を満たす実装と変わらない。 + +```cpp example +#include +#include +#include +#include +#include +#include +#include + +// すべての項目を明示的に定義したアロケータ +template +struct FullAllocator { + using value_type = T; + + // ポインタ型。既定ではvalue_typeから導出される + using pointer = T*; + using const_pointer = const T*; + using void_pointer = void*; + using const_void_pointer = const void*; + + // サイズと差分の型。既定ではポインタ型から導出される + using size_type = std::size_t; + using difference_type = std::ptrdiff_t; + + // コンテナのコピー代入・ムーブ代入・交換でアロケータを伝播させるか + // 既定ではいずれもfalse_type + using propagate_on_container_copy_assignment = std::false_type; + using propagate_on_container_move_assignment = std::true_type; + using propagate_on_container_swap = std::false_type; + + // 同じ型のアロケータがつねに等値であるか。既定ではstd::is_empty::type + using is_always_equal = std::true_type; + + // 別の要素型に対応するアロケータ型。既定ではテンプレート引数を差し替えた型 + template + struct rebind { + using other = FullAllocator; + }; + + FullAllocator() = default; + + template + FullAllocator(const FullAllocator&) {} + + pointer allocate(size_type n) + { + return static_cast(::operator new(n * sizeof(T))); + } + + // ヒントを指定した確保。既定ではallocate(n)が使用される + pointer allocate(size_type n, const_void_pointer) + { + return allocate(n); + } + + // 要求した数以上の記憶域を確保する。既定ではallocate(n)が使用される + std::allocation_result allocate_at_least(size_type n) + { + return {allocate(n), n}; + } + + void deallocate(pointer p, size_type) + { + ::operator delete(p); + } + + // 確保できる最大の要素数。既定では要素型のサイズから算出される + size_type max_size() const + { + return std::numeric_limits::max() / sizeof(T); + } + + // 要素の構築と破棄。既定ではstd::construct_at()とstd::destroy_at()が使用される + template + void construct(U* p, Args&&... args) + { + std::construct_at(p, std::forward(args)...); + } + + template + void destroy(U* p) + { + std::destroy_at(p); + } + + // コンテナのコピー構築時に、コピー先が使用するアロケータ。既定では*this + FullAllocator select_on_container_copy_construction() const + { + return *this; + } + + template + bool operator==(const FullAllocator&) const + { + return true; + } +}; + +int main() +{ + // listはノードを確保するため、rebindによって要素型を差し替えたアロケータを使用する + std::list> ls = {1, 2, 3}; + + for (int x : ls) { + std::cout << x << std::endl; + } +} +``` +* std::ptrdiff_t[link /reference/cstddef/ptrdiff_t.md] +* std::allocation_result[link /reference/memory/allocation_result.md] +* std::construct_at[link /reference/memory/construct_at.md] +* std::destroy_at[link /reference/memory/destroy_at.md] +* ::operator new[link /reference/new/op_new.md] +* ::operator delete[link /reference/new/op_delete.md] + +#### 出力 +``` +1 +2 +3 +``` + + +## 関連項目 +- [標準ライブラリ要件](/requirements.md) +- [`std::allocator`](/reference/memory/allocator.md) +- [`std::allocator_traits`](/reference/memory/allocator_traits.md) +- [`std::pmr::polymorphic_allocator`](/reference/memory_resource/polymorphic_allocator.md) +- [`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink) +- [`Cpp17NullablePointer`](/requirements/Cpp17NullablePointer.md.nolink) diff --git a/requirements/Cpp17EqualityComparable.md b/requirements/Cpp17EqualityComparable.md new file mode 100644 index 0000000000..ec6e2371fb --- /dev/null +++ b/requirements/Cpp17EqualityComparable.md @@ -0,0 +1,116 @@ +# Cpp17EqualityComparable +* named requirement[meta id-type] + +## 概要 +`Cpp17EqualityComparable`は、型`T`の値が`==`演算子で等値比較できることを表す要件である。 + +[`std::find()`](/reference/algorithm/find.md)のように値を探すアルゴリズムや、[`std::unordered_map`](/reference/unordered_map/unordered_map.md)のようにキーの一致を判定するコンテナが、この要件を要求する。 + + +## 要件 +型`T`の(CV修飾された可能性のある)値`a`、`b`、`c`において、以下の式が妥当であること。 + +```cpp +a == b +``` + +- 結果の型が[`boolean-testable`](/reference/concepts/boolean-testable.md)のモデルであること +- `==`が同値関係であること。すなわち、以下の性質をもつこと + - すべての`a`について、`a == b`が`true`となること (反射律) + - `a == b`ならば、`b == a`となること (対称律) + - `a == b`かつ`b == c`ならば、`a == c`となること (推移律) + + +## 対応する標準コンセプト +- [`std::equality_comparable`](/reference/concepts/equality_comparable.md) (C++20) + +この要件との違いは以下である。 + +- この要件が要求する式は`a == b`のみである。コンセプトは`a == b`・`a != b`・`b == a`・`b != a`の4つの式を要求する +- この要件は`==`が同値関係であることを要求する。コンセプトはさらに、`a == b`が`true`となるのは`a`と`b`が等値であるとき、かつそのときだけであることを要求する + - 値の一部だけを比較する`==`は、同値関係ではあるが等値の判定ではないため、この要件は満たすがコンセプトのモデルとはならない +- コンセプトはコンパイル時に検査できる + +コンセプトを満たす型はこの要件も満たすが、その逆は成り立たない。 + + +## 例 +### 等値比較可能な型を実装する (最小要件を満たす実装) +要件が求める式は`a == b`のみであるため、等値比較演算子をひとつ定義すればよい。 + +```cpp example +#include +#include +#include + +// 要件が求めるのは式`a == b`が妥当であることだけなので、 +// 等値比較演算子をひとつ定義すれば要件を満たす +struct ID { + int value; + + // 反射律・対称律・推移律を満たすように実装する + friend bool operator==(const ID& a, const ID& b) + { + return a.value == b.value; + } +}; + +int main() +{ + std::vector ids = {{1}, {2}, {3}}; + + // std::findは、要素型がCpp17EqualityComparable要件を満たすことを要求する + auto it = std::find(ids.begin(), ids.end(), ID{2}); + std::cout << it->value << std::endl; +} +``` +* std::find[link /reference/algorithm/find.md] +* ids.begin()[link /reference/vector/vector/begin.md] +* ids.end()[link /reference/vector/vector/end.md] + +#### 出力 +``` +2 +``` + +### 等値比較可能な型を実装する (標準コンセプトも満たす実装) +等値比較演算子を`= default`で定義すると、全メンバの等値比較となり、[`std::equality_comparable`](/reference/concepts/equality_comparable.md)も満たす。 + +```cpp example +#include +#include + +struct Point { + int x; + int y; + + // = defaultで定義すると、全メンバの等値比較となる + bool operator==(const Point&) const = default; +}; + +// C++20では`!=`が`==`から自動的に導出されるため、標準コンセプトも満たす +static_assert(std::equality_comparable); + +int main() +{ + Point a = {1, 2}; + Point b = {3, 4}; + + std::cout << std::boolalpha; + std::cout << (a == b) << std::endl; + std::cout << (a != b) << std::endl; +} +``` +* std::equality_comparable[link /reference/concepts/equality_comparable.md] + +#### 出力 +``` +false +true +``` + + +## 関連項目 +- [標準ライブラリ要件](/requirements.md) +- [`Cpp17LessThanComparable`](/requirements/Cpp17LessThanComparable.md.nolink) +- [`std::equality_comparable`](/reference/concepts/equality_comparable.md) diff --git a/start_editing/named_requirement_template_page.md b/start_editing/named_requirement_template_page.md index b4b5e64976..0c5483dfe6 100644 --- a/start_editing/named_requirement_template_page.md +++ b/start_editing/named_requirement_template_page.md @@ -7,11 +7,9 @@ その際拡張構文である`example`タグをルールに従って付け、コンパイル・実行可能にすることを検討してください。 ) -* [meta exposition-only] * named requirement[meta id-type] * cpp17[meta cpp] - @@ -45,23 +43,49 @@ `Requirement`は、型がxxであることを表す要件である。 +(標準ライブラリのどの機能がこの要件を要求するかを記述してください。読者が、なぜこの要件を知る必要があるかを判断できるようにします。) + ## 要件 -(ここには、名前付き要件で要求される内容を記述します) +(ここには、名前付き要件で要求される内容を記述します。) + +(項目数が多い要件では、省略できない項目と省略できる項目を表に分けて記述します。省略できる項目には、省略した場合の既定の定義を併記してください。) + + +## 対応する標準コンセプト +(ここには、この要件に対応する標準ライブラリのコンセプトへのリンクと、要件との違いを記述します。対応するコンセプトがない場合は、項目を削除してください。) + +- `std::concept_name` (C++20) (コンセプトのリファレンスページへのリンクにします) + +この要件との違いは以下である。 + +- (要求する式の違い、意味論の違い、コンパイル時に検査できるかの違いなどを箇条書きで記述します。) + +(要件とコンセプトのどちらがどちらを含むかを明記してください。) + ## 備考 (ここには、名前付き要件を説明するにあたっての、補足事項を記述します。とくになければ、項目を削除してください。) + ## `Requirement`に該当する型 (ここには、名前付き要件に該当する型を列挙します。とくに必要がないと判断した場合、項目を削除してください。) * xx型 * yy型 + ## 例 +### 自作のxxを実装する (最小要件を満たす実装) +(要件を満たす型を自作する例を、最小要件を満たす実装と、要件を完全に満たす実装の2つの見出し3に分けて記述します。読者が自作の型を書けるようにすることが目的です。) + +(サンプルコードには、各項目が何を意味するかの解説コメントを付けてください。) + +(省略できない項目だけを定義した実装を示します。) + ```cpp example -// (ここには、名前付き要件を解説するための、サンプルコードを記述します。) // (インクルードとmain()関数を含む、実行可能なサンプルコードを記述してください。そのようなコードブロックにはexampleタグを付けます。) +// (標準ライブラリのどの機能に渡せるかがわかるように、実際に使用するコードを含めてください。) #include @@ -70,19 +94,36 @@ int main() } ``` -### 出力 +(コードブロック中の識別子のうち、`GLOBAL_QUALIFY_LIST.txt`に登録されていないものには、コードブロック直後にリンクを記述します。) + +#### 出力 +``` +``` + +### 自作のxxを実装する (要件を完全に満たす実装) +(省略できる項目もすべて明示的に定義した実装を示します。省略した場合の既定の定義と同じ内容であることを述べてください。) + +```cpp example +#include + +int main() +{ +} +``` + +#### 出力 ``` ``` (ここには、サンプルコードの実行結果を記述します。何も出力がない場合は、項目を削除せず、空の出力にしてください。) (実行結果が処理系・実行環境によって異なる場合は、項目名を「出力例」に変更し、可能であればその理由も併記してください。) -## バージョン -### 言語 -- C++17 ## 関連項目 (ここには、その機能と関連のあるcpprefjpサイト内の項目へのリンクを記述します。とくに必要がないと判断した場合、項目を削除してください。) +- [標準ライブラリ要件](/requirements.md) + + ## 参照 (ここには、その名前付き要件を理解するにあたっての参考資料や、関連する機能へのリンクを記述します。とくに必要がないと判断した場合、項目を削除してください。) diff --git a/working_style.md b/working_style.md index 8d952356d7..f2a17fa7bb 100644 --- a/working_style.md +++ b/working_style.md @@ -138,6 +138,7 @@ C++11以降対応については対応バージョンを明記します。バー | requires | 要件 | | returns | 戻り値 | | reverse iterator | 逆イテレータ | +| reversible container(s) | 逆順可能コンテナ | | rvalue reference | 右辺値参照 | | sequence container(s) | シーケンスコンテナ | | signed | 符号付き |