Skip to content

Commit 5d06806

Browse files
Merge pull request #1760 from cpprefjp/requirements
requirements階層を新設し、Cpp17EqualityComprableとCpp17Allocatorをたたき台として追加。雛形も書いた
2 parents e045a0f + 838f075 commit 5d06806

45 files changed

Lines changed: 685 additions & 63 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎reference/array/to_array.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ namespace std {
2323
2424
2525
## 事前条件
26-
- (1) : `T` は `Cpp17CopyConstructible` 要件を満たしていること。
27-
- (2) : `T` は `Cpp17MoveConstructible` 要件を満たしていること。
26+
- (1) : `T` は [`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink) 要件を満たしていること。
27+
- (2) : `T` は [`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink) 要件を満たしていること。
2828
2929
3030
## 戻り値

‎reference/barrier/barrier.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ namespace std {
4545
完了ステップの終了は、完了ステップによりブロック解除される全ての関数呼び出しからの復帰**よりも確実に前に発生する**。
4646
テンプレートパラメータ`CompletionFunction`のデフォルト値以外の特殊化においては、完了ステップの進行中にバリアオブジェクトの[`wait()`](barrier/wait.md)を除くメンバ関数が呼び出されると、その動作は未定義となる。
4747
48-
テンプレートパラメータ`CompletionFunction`のデフォルト値は、追加で Cpp17DefaultConstructible 要件を満たす未規定の型であり、式`completion()`は何の副作用も生じない。
48+
テンプレートパラメータ`CompletionFunction`のデフォルト値は、追加で [`Cpp17DefaultConstructible`](/requirements/Cpp17DefaultConstructible.md.nolink) 要件を満たす未規定の型であり、式`completion()`は何の副作用も生じない。
4949
つまりテンプレートパラメータを省略した`barrier<>`オブジェクトでは、各フェーズ完了時に追加的な処理を行わない。
5050
51-
`barrier::arrival_token`は、Cpp17MoveConstructible 要件および Cpp17MoveAssignable 要件および Cpp17Destructible 要件を満たす未規定の型。
51+
`barrier::arrival_token`は、[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink) 要件および [`Cpp17MoveAssignable`](/requirements/Cpp17MoveAssignable.md.nolink) 要件および [`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink) 要件を満たす未規定の型。
5252
つまり、コピー不可/ムーブのみ可能な型。
5353
5454
5555
## 適格要件
56-
テンプレートパラメータ`CompletionFunction`は Cpp17MoveConstructible 要件および Cpp17Destructible 要件を満たしていること。
56+
テンプレートパラメータ`CompletionFunction`は [`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink) 要件および [`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink) 要件を満たしていること。
5757
[`is_nothrow_invocable_v`](/reference/type_traits/is_nothrow_invocable.md)`<CompletionFunction&> == true`
5858
5959

‎reference/chrono/is_clock.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ int main()
8686

8787
## 参照
8888
- [LWG Issue 4487. Is member `is_steady` of a Cpp17Clock type required to be usable in constant expressions?](https://cplusplus.github.io/LWG/issue4487)
89-
- `C1::is_steady`が定数式で使用できることが要件に追加された。それ以前は`const bool`とだけ規定されており、利用者定義のクロックに対して同じ要求があるかが不明確だった。規格としてはC++29のワーキングドラフトへ適用されたが、未規定だった点の明文化であるため、Cpp17Clock要件が規定されたC++11へ遡及して適用される
89+
- `C1::is_steady`が定数式で使用できることが要件に追加された。それ以前は`const bool`とだけ規定されており、利用者定義のクロックに対して同じ要求があるかが不明確だった。規格としてはC++29のワーキングドラフトへ適用されたが、未規定だった点の明文化であるため、[`Cpp17Clock`](/requirements/Cpp17Clock.md.nolink)要件が規定されたC++11へ遡及して適用される

‎reference/concepts/Invoke.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ C++における関数呼び出しという性質を抽象化しまとめた、
5858
2. *INVOKE*`<R>(f, t1, t2, ..., tN)` を次のように定義する。
5959
- `R`が`void`かそのcv修飾の場合は、`static_cast<void>(`*INVOKE*`(f, t1, t2, ..., tN))`。
6060
- それ以外の場合は、*INVOKE*`(f, t1, t2, ..., tN)` の実行結果の戻り値が型 `R` に暗黙的に変換されること。
61-
3. すべての *call-wrapper* は、*Cpp17MoveConstructible* かつ *Cpp17Destructible* でなければならない。
61+
3. すべての *call-wrapper* は、[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink) かつ [`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink) でなければならない。
6262

6363
## 要件(C++23差分)
6464
C++20 における 2. について、次の文言を項目の最後に追加する。この変更は、`R`が参照かつ*INVOKE*の実行結果が`R`に束縛されることで寿命が延長される場合にダングリング参照が作成されてしまう事例を検出するための要件である。

‎reference/exception/throw_with_nested.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace std {
1616
1717
1818
## 事前条件
19-
`U`を [`decay_t`](/reference/type_traits/decay.md)`<T>` として、型`U`がコピー構築可能(*Cpp17CopyConstructible*)の要件を満たすこと。
19+
`U`を [`decay_t`](/reference/type_traits/decay.md)`<T>` として、型`U`がコピー構築可能([`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink))の要件を満たすこと。
2020
2121
2222
## 例外

‎reference/execution/execution/task.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace std::execution {
3636
3737
`error_types`が[`completion_signatures`](completion_signatures.md)`<ErrorSigs...>`の特殊化ではない、もしくは`ErrorSigs`が[`set_error_t`](set_error.md)`(E)`が適格でない要素型`E`を含むとき、プログラムは不適格となる。
3838
39-
`allocator_type`はCpp17Allocator要件を満たし、`start_scheduler_type`は[`scheduler`](scheduler.md)のモデルであり、`stop_source_type`は[`stoppable-source`](/reference/stop_token/stoppable-source.md)のモデルであること。
39+
`allocator_type`は[`Cpp17Allocator`](/requirements/Cpp17Allocator.md)要件を満たし、`start_scheduler_type`は[`scheduler`](scheduler.md)のモデルであり、`stop_source_type`は[`stoppable-source`](/reference/stop_token/stoppable-source.md)のモデルであること。
4040
4141
`task`クラステンプレートは、下記の静的メンバ関数テンプレートを定義する。
4242

‎reference/expected/expected.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ namespace std {
2929
3030
- 型`T`および型`E`は、参照型、関数型、[`in_place_t`](/reference/utility/in_place_t.md)、[`unexpect_t`](unexpect_t.md)のいずれでもないこと。
3131
- 型`T`は[`unexpected`](unexpected.md)の特殊化ではないこと。
32-
- 型`T`が(CV修飾された)`void`型でなければ、型`T`はCpp17Destructible要件を満たすこと。
32+
- 型`T`が(CV修飾された)`void`型でなければ、型`T`は[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件を満たすこと。
3333
- 型`E`は非オブジェクト型、配列型、`unexpected`の特殊化、CV修飾された型のいずれでもないこと。
34-
- 型`E`はCpp17Destructible要件を満たすこと。
34+
- 型`E`は[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)要件を満たすこと。
3535
3636
3737
## メンバ関数(プライマリテンプレート)

‎reference/format/formatter.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace std {
6565
6666
型`F`がFormatter要件を満たすとは、次のことをいう。
6767
68-
- `F`は`Cpp17DefaultConstructible`、`Cpp17CopyConstructible`、`Cpp17CopyAssignable`、`Cpp17Destructible`であること
68+
- `F`は[`Cpp17DefaultConstructible`](/requirements/Cpp17DefaultConstructible.md.nolink)、[`Cpp17CopyConstructible`](/requirements/Cpp17CopyConstructible.md.nolink)、[`Cpp17CopyAssignable`](/requirements/Cpp17CopyAssignable.md.nolink)、[`Cpp17Destructible`](/requirements/Cpp17Destructible.md.nolink)であること
6969
7070
さらに、以下の条件を満たすこと
7171

‎reference/functional/bind_back.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ namespace std {
2525
[`decay_t`](/reference/type_traits/decay.md)`<F>`を適用した型を`FD`、[`decay_t`](/reference/type_traits/decay.md)`<Args>...`を適用した型パラメータパックを`BoundArgs`として
2626
2727
- (1) :
28-
- `FD`がCpp17MoveConstructible要件を満たすこと
29-
- `BoundArgs`のそれぞれの型`Ti`が[オブジェクト型](/reference/type_traits/is_object.md)である場合、Cpp17MoveConstructible要件を満たすこと
28+
- `FD`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと
29+
- `BoundArgs`のそれぞれの型`Ti`が[オブジェクト型](/reference/type_traits/is_object.md)である場合、[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと
3030
- (2) :
31-
- `BoundArgs`のそれぞれの型`Ti`がCpp17MoveConstructible要件を満たすこと
31+
- `BoundArgs`のそれぞれの型`Ti`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと
3232
3333
3434
## 適格要件

‎reference/functional/bind_front.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ auto f3 = bind_front(&Strategy::process, Strategy{});
5555
[`decay_t`](/reference/type_traits/decay.md)`<F>`を適用した型を`FD`、[`decay_t`](/reference/type_traits/decay.md)`<Args>...`を適用した型パラメータパックを`BoundArgs`として
5656

5757
- (1) :
58-
- `FD`がCpp17MoveConstructible要件を満たすこと
59-
- `BoundArgs`のそれぞれの型`Ti`が[オブジェクト型](/reference/type_traits/is_object.md)である場合、Cpp17MoveConstructible要件を満たすこと
58+
- `FD`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと
59+
- `BoundArgs`のそれぞれの型`Ti`が[オブジェクト型](/reference/type_traits/is_object.md)である場合、[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと
6060
- (2) :
61-
- `BoundArgs`のそれぞれの型`Ti`がCpp17MoveConstructible要件を満たすこと
61+
- `BoundArgs`のそれぞれの型`Ti`が[`Cpp17MoveConstructible`](/requirements/Cpp17MoveConstructible.md.nolink)要件を満たすこと
6262

6363

6464
## 適格要件

0 commit comments

Comments
 (0)