Skip to content

Commit

Permalink
container-compatible-rangeコンセプトを追加 #1069
Browse files Browse the repository at this point in the history
  • Loading branch information
faithandbrave committed Aug 16, 2023
1 parent 1e33730 commit f3f7503
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
7 changes: 7 additions & 0 deletions reference/exposition-only.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
| [`synth-three-way`](exposition-only/synth-three-way-result.md) | 三方比較可能であればそれを行い、そうでなければ三方比較を実装して比較を行う (variable) | C++20 |
| [`synth-three-way-result`](exposition-only/synth-three-way-result.md) | `synth-three-way`関数オブジェクトでの比較結果の型 (function template) | C++20 |


## コンテナ

| 名前 | 説明 | 対応バージョン |
|------|------|----------------|
| [`container-compatible-range`](exposition-only/container-compatible-range.md) | 指定されたコンテナと互換性のあるRange | C++23 |

## `<concepts>`

| 名前 | 説明 | 対応バージョン |
Expand Down
27 changes: 27 additions & 0 deletions reference/exposition-only/container-compatible-range.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# container-compatible-range
* exposition-only[meta header]
* concept[meta id-type]
* cpp23[meta cpp]

```cpp
namespace std {
template<class R, class T>
concept container-compatible-range =
ranges::input_range<R> && convertible_to<ranges::range_reference_t<R>, T>;
}
```
* ranges::input_range[link /reference/ranges/input_range.md]
* ranges::range_reference[link /reference/ranges/range_reference_t.md]
* convertible_to[link /reference/concepts/convertible_to.md]
## 概要
container-compatible-rangeは、指定されたコンテナと互換性のあるRangeであることを表すコンセプトである。
## バージョン
### 言語
- C++23
## 参照
- [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)
1 change: 1 addition & 0 deletions reference/flat_map/flat_map/insert.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ void insert(sorted_unique_t s,
* pair[link /reference/utility/pair.md]
* initializer_list[link /reference/initializer_list/initializer_list.md]
* sorted_unique_t[link /reference/flat_map/sorted_unique_t.md]
* container-compatible-range[link /reference/exposition-only/container-compatible-range.md]
## 概要
新しく一つの要素(引数 `x`, `y`を使う)または要素のシーケンス(入力イテレータまたは `initializer_list` を使う)を挿入し、コンテナを拡張する。
Expand Down

0 comments on commit f3f7503

Please sign in to comment.