Skip to content

Commit f3f7503

Browse files
committed
container-compatible-rangeコンセプトを追加 #1069
1 parent 1e33730 commit f3f7503

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

reference/exposition-only.md

+7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
| [`synth-three-way`](exposition-only/synth-three-way-result.md) | 三方比較可能であればそれを行い、そうでなければ三方比較を実装して比較を行う (variable) | C++20 |
1212
| [`synth-three-way-result`](exposition-only/synth-three-way-result.md) | `synth-three-way`関数オブジェクトでの比較結果の型 (function template) | C++20 |
1313

14+
15+
## コンテナ
16+
17+
| 名前 | 説明 | 対応バージョン |
18+
|------|------|----------------|
19+
| [`container-compatible-range`](exposition-only/container-compatible-range.md) | 指定されたコンテナと互換性のあるRange | C++23 |
20+
1421
## `<concepts>`
1522

1623
| 名前 | 説明 | 対応バージョン |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# container-compatible-range
2+
* exposition-only[meta header]
3+
* concept[meta id-type]
4+
* cpp23[meta cpp]
5+
6+
```cpp
7+
namespace std {
8+
template<class R, class T>
9+
concept container-compatible-range =
10+
ranges::input_range<R> && convertible_to<ranges::range_reference_t<R>, T>;
11+
}
12+
```
13+
* ranges::input_range[link /reference/ranges/input_range.md]
14+
* ranges::range_reference[link /reference/ranges/range_reference_t.md]
15+
* convertible_to[link /reference/concepts/convertible_to.md]
16+
17+
## 概要
18+
container-compatible-rangeは、指定されたコンテナと互換性のあるRangeであることを表すコンセプトである。
19+
20+
21+
## バージョン
22+
### 言語
23+
- C++23
24+
25+
26+
## 参照
27+
- [P1206R7 `ranges::to`: A function to convert any range to a container](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1206r7.pdf)

reference/flat_map/flat_map/insert.md

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ void insert(sorted_unique_t s,
4141
* pair[link /reference/utility/pair.md]
4242
* initializer_list[link /reference/initializer_list/initializer_list.md]
4343
* sorted_unique_t[link /reference/flat_map/sorted_unique_t.md]
44+
* container-compatible-range[link /reference/exposition-only/container-compatible-range.md]
4445
4546
## 概要
4647
新しく一つの要素(引数 `x`, `y`を使う)または要素のシーケンス(入力イテレータまたは `initializer_list` を使う)を挿入し、コンテナを拡張する。

0 commit comments

Comments
 (0)