Skip to content

Commit dd53e52

Browse files
author
cpprefjp-autoupdate
committed
update automatically
1 parent be58cfb commit dd53e52

File tree

3 files changed

+103
-143
lines changed

3 files changed

+103
-143
lines changed

reference/flat_map/flat_map.html

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
<meta property="og:url" content="https://cpprefjp.github.io/reference/flat_map/flat_map.html" />
2929
<meta property="og:site_name" content="cpprefjp - C++日本語リファレンス" />
3030
<meta property="og:type" content="article" />
31-
<meta property="og:description" content="" />
31+
<meta property="og:description" content="`std::flat_map`は、重複しない要素を格納する連想コンテナの一種であり、キーとそれに対応する値を格納する。" />
3232
<meta name="twitter:card" content="summary" />
3333
<meta name="twitter:title" content="flat_map - cpprefjp C++日本語リファレンス" />
3434
<meta name="twitter:url" content="https://cpprefjp.github.io/reference/flat_map/flat_map.html" />
35-
<meta name="twitter:description" content="" />
35+
<meta name="twitter:description" content="`std::flat_map`は、重複しない要素を格納する連想コンテナの一種であり、キーとそれに対応する値を格納する。" />
3636

3737

3838
<link rel="alternate" type="application/atom+xml" title="Atom" href="https://cpprefjp.github.io/rss.xml" />
@@ -188,12 +188,12 @@
188188

189189
<p class="text-right"><small>
190190
最終更新日時(UTC):
191-
<span itemprop="datePublished" content="2025-02-11T00:56:25">
192-
2025年02月11日 00時56分25秒
191+
<span itemprop="datePublished" content="2025-05-14T06:27:50">
192+
2025年05月14日 06時27分50秒
193193
</span>
194194
<br/>
195195
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
196-
<span itemprop="name">suomesta</span>
196+
<span itemprop="name">Akira Takahashi</span>
197197
</span>
198198
が更新
199199
</small></p>
@@ -224,6 +224,39 @@
224224
</code></pre></div>
225225
</p>
226226
<h2>概要</h2>
227+
<p><code>std::flat_map</code>は、重複しない要素を格納する連想コンテナの一種であり、キーとそれに対応する値を格納する。</p>
228+
<p><code>std::flat_map</code>は、ノードベースで実装される<code><a href="../map/map.html">std::map</a></code>、ハッシュテーブルで実装される<code><a href="../unordered_map/unordered_map.html">std::unordered_map</a></code>とは異なり、ソート済み配列と二分探索の組み合わせで実装される。これはほかの実装と比較して、メモリ使用量と列挙速度において優位であり、一方で挿入速度と検索速度はほかの実装に劣る。</p>
229+
<p>また、このクラスは分類としては<code><a href="../queue/queue.html">std::queue</a></code><code><a href="../stack/stack.html">std::skack</a></code>と同様のコンテナアダプタに分類され、キーの配列と値の配列の2つを内部で持ち、それを<code><a href="../ranges/zip_view.html">std::ranges::zip_view</a></code>で綴じあわせて扱う実装となっている。</p>
230+
<p>このコンテナクラスは、ランダムアクセスイテレータをサポートする。</p>
231+
<h3>ほかの連想コンテナとの要件の違い</h3>
232+
<p>このクラスは要件として、コンテナクラスと、逆順コンテナクラスであることは満たすが、連想コンテナの要件としては以下を満たさない:</p>
233+
<ul>
234+
<li>node handleに関する要件</li>
235+
<li>イテレータ無効化に関する要件</li>
236+
<li>単一要素の挿入と削除に線形時間かかる (挿入位置のイテレータを指定したとしても)</li>
237+
</ul>
238+
<p>また、このコンテナはメモリアロケータを指定できない設計にもなっている。</p>
239+
<p><code>value_type</code>は、<code><a href="../map/map.html">std::map</a></code>では<code><a href="../utility/pair.html">std::pair</a>&lt;const Key, T&gt;</code>だが、このクラスは<code><a href="../utility/pair.html">std::pair</a>&lt;Key, T&gt;</code>である (<code>const</code>がつかない)。</p>
240+
<p>以下の不変条件をもち、メンバ関数のいずれかが<a class="cpprefjp-defined-word" data-desc="問題が発生したときに、現在実行位置を過去に通過・記録した位置に戻し、文脈情報を添えて紐づけられた処理(例外ハンドラー)を呼び出す仕組み。またはその事態">例外</a>によって終了した場合には不変条件の状態に復元される (ただし、その復元操作によってコンテナが空になる可能性がある):</p>
241+
<ul>
242+
<li>キーの配列と値の配列が、同じ要素数をもつ</li>
243+
<li>キーの配列が、指定された比較関数オブジェクトを尊重してソートを行う</li>
244+
<li>値の配列内のオフセット<code>off</code>の値は、キー配列内のオフセット<code>off</code>のキーに関連付けられた値である</li>
245+
</ul>
246+
<h2><a class="cpprefjp-defined-word" data-desc="関数等の意味論を構成する要素の1つ。Constraints。関数であればオーバーロード解決に参加するための条件、それ以外であれば受け付ける型の条件">テンプレートパラメータ制約</a></h2>
247+
<ul>
248+
<li><code>KeyContainer</code><code>MappedContainer</code>に指定するコンテナ型は、<ul>
249+
<li>シーケンスコンテナの要件を満たし、</li>
250+
<li>ランダムアクセスイテレータをもち、</li>
251+
<li><a class="cpprefjp-defined-word" data-desc="問題が発生したときに、現在実行位置を過去に通過・記録した位置に戻し、文脈情報を添えて紐づけられた処理(例外ハンドラー)を呼び出す仕組み。またはその事態">例外</a>を送出しないメンバ関数<code>size()</code><code>max_size()</code>をもつこと</li>
252+
</ul>
253+
</li>
254+
</ul>
255+
<h2><a class="cpprefjp-defined-word" data-desc="関数等の意味論を構成する要素の1つ。Mandates。満たさなければプログラムが不適格となる要件。この要件は、オーバーロード解決によって選択された関数内での`static_assert`の定数条件式や、関数に対するdelete宣言などで表現できる">適格要件</a></h2>
256+
<ul>
257+
<li><code>Key</code><code>KeyContainer::value_type</code>と同じ型であること</li>
258+
<li><code>T</code><code>MappedContainer::value_type</code>と同じ型であること</li>
259+
</ul>
227260
<h2>メンバ関数</h2>
228261
<h3>構築・破棄</h3>
229262
<table border="1" bordercolor="#888" style="border-collapse:collapse">

rss.xml

Lines changed: 64 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,72 @@
22
<feed xmlns="http://www.w3.org/2005/Atom">
33
<title>cpprefjp - C++日本語リファレンス</title>
44
<link href="https://cpprefjp.github.io" />
5-
<updated>2025-05-14T05:33:56.623771</updated>
6-
<id>18837619-8c90-4be5-8f1f-5bd62b2acd9c</id>
5+
<updated>2025-05-14T06:31:35.783848</updated>
6+
<id>10bb8ac7-53c2-42c4-a4c0-746d668f901a</id>
77

88

9+
<entry>
10+
<title>flat_map -- flat_map : 概要文章を追加 #1448</title>
11+
<link href="https://cpprefjp.github.io/reference/flat_map/flat_map.html"/>
12+
<id>8043d35a56076a5036c88dcf8acb41a56bf7b6fc:reference/flat_map/flat_map.md</id>
13+
<updated>2025-05-14T15:27:50+09:00</updated>
14+
15+
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/flat_map/flat_map.md b/reference/flat_map/flat_map.md
16+
index 584048a91..222468b99 100644
17+
--- a/reference/flat_map/flat_map.md
18+
+++ b/reference/flat_map/flat_map.md
19+
@@ -18,6 +18,43 @@ namespace std {
20+
* vector[link /reference/vector/vector.md]
21+
22+
## 概要
23+
+`std::flat_map`は、重複しない要素を格納する連想コンテナの一種であり、キーとそれに対応する値を格納する。
24+
+
25+
+`std::flat_map`は、ノードベースで実装される[`std::map`](/reference/map/map.md)、ハッシュテーブルで実装される[`std::unordered_map`](/reference/unordered_map/unordered_map.md)とは異なり、ソート済み配列と二分探索の組み合わせで実装される。これはほかの実装と比較して、メモリ使用量と列挙速度において優位であり、一方で挿入速度と検索速度はほかの実装に劣る。
26+
+
27+
+また、このクラスは分類としては[`std::queue`](/reference/queue/queue.md)や[`std::skack`](/reference/stack/stack.md)と同様のコンテナアダプタに分類され、キーの配列と値の配列の2つを内部で持ち、それを[`std::ranges::zip_view`](/reference/ranges/zip_view.md)で綴じあわせて扱う実装となっている。
28+
+
29+
+このコンテナクラスは、ランダムアクセスイテレータをサポートする。
30+
+
31+
+
32+
+### ほかの連想コンテナとの要件の違い
33+
+このクラスは要件として、コンテナクラスと、逆順コンテナクラスであることは満たすが、連想コンテナの要件としては以下を満たさない:
34+
+
35+
+- node handleに関する要件
36+
+- イテレータ無効化に関する要件
37+
+- 単一要素の挿入と削除に線形時間かかる (挿入位置のイテレータを指定したとしても)
38+
+
39+
+また、このコンテナはメモリアロケータを指定できない設計にもなっている。
40+
+
41+
+`value_type`は、[`std::map`](/reference/map/map.md)では[`std::pair`](/reference/utility/pair.md)`&amp;lt;const Key, T&amp;gt;`だが、このクラスは[`std::pair`](/reference/utility/pair.md)`&amp;lt;Key, T&amp;gt;`である (`const`がつかない)。
42+
+
43+
+以下の不変条件をもち、メンバ関数のいずれかが例外によって終了した場合には不変条件の状態に復元される (ただし、その復元操作によってコンテナが空になる可能性がある):
44+
+
45+
+- キーの配列と値の配列が、同じ要素数をもつ
46+
+- キーの配列が、指定された比較関数オブジェクトを尊重してソートを行う
47+
+- 値の配列内のオフセット`off`の値は、キー配列内のオフセット`off`のキーに関連付けられた値である
48+
+
49+
+
50+
+## テンプレートパラメータ制約
51+
+- `KeyContainer`と`MappedContainer`に指定するコンテナ型は、
52+
+ - シーケンスコンテナの要件を満たし、
53+
+ - ランダムアクセスイテレータをもち、
54+
+ - 例外を送出しないメンバ関数`size()`と`max_size()`をもつこと
55+
+
56+
+
57+
+## 適格要件
58+
+- `Key`が`KeyContainer::value_type`と同じ型であること
59+
+- `T`が`MappedContainer::value_type`と同じ型であること
60+
61+
62+
## メンバ関数
63+
&lt;/code&gt;&lt;/pre&gt;</summary>
64+
65+
<author>
66+
<name>Akira Takahashi</name>
67+
<email>[email protected]</email>
68+
</author>
69+
</entry>
70+
971
<entry>
1072
<title>処理系 -- Visual Studio 2022 Update 14: VC++バージョンと_MSC_VERを埋めた</title>
1173
<link href="https://cpprefjp.github.io/implementation.html"/>
@@ -4076,139 +4138,4 @@ index 4599e85ab..b105d2814 100644
40764138
</author>
40774139
</entry>
40784140

4079-
<entry>
4080-
<title>basic-operation -- typo修正とNGワード追加</title>
4081-
<link href="https://cpprefjp.github.io/reference/execution/execution/basic-operation.html"/>
4082-
<id>4a750d84b5b319ec2360d43b1748873cd765d56e:reference/execution/execution/basic-operation.md</id>
4083-
<updated>2025-05-13T18:04:57+09:00</updated>
4084-
4085-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/execution/execution/basic-operation.md b/reference/execution/execution/basic-operation.md
4086-
index 73d010747..43cbb0c46 100644
4087-
--- a/reference/execution/execution/basic-operation.md
4088-
+++ b/reference/execution/execution/basic-operation.md
4089-
@@ -46,7 +46,7 @@ namespace std::execution {
4090-
## 概要
4091-
`basic-operation`および`basic-state`は、Senderアルゴリズム動作仕様定義で用いられる説明専用のクラステンプレートである。
4092-
4093-
-`basic-operation&amp;lt;Sndr, Rcvr&amp;gt;`は[`operation_state`](operation_state.md)のモデルであり、[Senderアルゴリズム](basic-sender.md)と[Recevier](receiver.md)の[接続(connect)](connect.md)結果型として利用される。
4094-
+`basic-operation&amp;lt;Sndr, Rcvr&amp;gt;`は[`operation_state`](operation_state.md)のモデルであり、[Senderアルゴリズム](basic-sender.md)と[Receiver](receiver.md)の[接続(connect)](connect.md)結果型として利用される。
4095-
4096-
- `rcvr` : 接続先Receiverオブジェクトを保持。Senderアルゴリズム同士を連結する場合は、親Senderアルゴリズム側の[Receiver](receiver.md)が該当する。
4097-
- `state` : Senderアルゴリズム構築時の引数リストを保持。([`impls-for`](impls-for.md)でカスタマイズ可能)
4098-
&lt;/code&gt;&lt;/pre&gt;</summary>
4099-
4100-
<author>
4101-
<name>Raclamusi</name>
4102-
<email>[email protected]</email>
4103-
</author>
4104-
</entry>
4105-
4106-
<entry>
4107-
<title>get-domain-early -- typo修正とNGワード追加</title>
4108-
<link href="https://cpprefjp.github.io/reference/execution/execution/get-domain-early.html"/>
4109-
<id>4a750d84b5b319ec2360d43b1748873cd765d56e:reference/execution/execution/get-domain-early.md</id>
4110-
<updated>2025-05-13T18:04:57+09:00</updated>
4111-
4112-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/execution/execution/get-domain-early.md b/reference/execution/execution/get-domain-early.md
4113-
index a9092276d..8ca93cb86 100644
4114-
--- a/reference/execution/execution/get-domain-early.md
4115-
+++ b/reference/execution/execution/get-domain-early.md
4116-
@@ -20,7 +20,7 @@ constexpr auto get-domain-early(const Sndr&amp;amp; sndr) noexcept;
4117-
4118-
4119-
## 効果
4120-
-説明用の型`Domain`を下記リストのうち最初に適格となる式の型と定義したとき、`return Doamin();`と等価。
4121-
+説明用の型`Domain`を下記リストのうち最初に適格となる式の型と定義したとき、`return Domain();`と等価。
4122-
4123-
- [`get_domain`](get_domain.md)`(`[`get_env`](get_env.md)`(sndr))`
4124-
- [`completion-domain`](completion-domain.md)`(sndr)`
4125-
&lt;/code&gt;&lt;/pre&gt;</summary>
4126-
4127-
<author>
4128-
<name>Raclamusi</name>
4129-
<email>[email protected]</email>
4130-
</author>
4131-
</entry>
4132-
4133-
<entry>
4134-
<title>get-domain-late -- typo修正とNGワード追加</title>
4135-
<link href="https://cpprefjp.github.io/reference/execution/execution/get-domain-late.html"/>
4136-
<id>4a750d84b5b319ec2360d43b1748873cd765d56e:reference/execution/execution/get-domain-late.md</id>
4137-
<updated>2025-05-13T18:04:57+09:00</updated>
4138-
4139-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/execution/execution/get-domain-late.md b/reference/execution/execution/get-domain-late.md
4140-
index 0d4e74a5e..bdfaec098 100644
4141-
--- a/reference/execution/execution/get-domain-late.md
4142-
+++ b/reference/execution/execution/get-domain-late.md
4143-
@@ -23,7 +23,7 @@ constexpr auto get-domain-late(const Sndr&amp;amp; sndr, const Env&amp;amp; env) noexcept;
4144-
4145-
4146-
## 効果
4147-
-説明用の型`Domain`を下記の通り定義したとき、`return Doamin();`と等価。
4148-
+説明用の型`Domain`を下記の通り定義したとき、`return Domain();`と等価。
4149-
4150-
- [`sender-for`](sender-for.md)`&amp;lt;Sndr,` [`continue_on_t`](continue_on.md.nolink)`&amp;gt; == true`のとき、次のラムダ式呼び出し結果の型とする。
4151-
4152-
&lt;/code&gt;&lt;/pre&gt;</summary>
4153-
4154-
<author>
4155-
<name>Raclamusi</name>
4156-
<email>[email protected]</email>
4157-
</author>
4158-
</entry>
4159-
4160-
<entry>
4161-
<title>query-with-default -- typo修正とNGワード追加</title>
4162-
<link href="https://cpprefjp.github.io/reference/execution/execution/query-with-default.html"/>
4163-
<id>4a750d84b5b319ec2360d43b1748873cd765d56e:reference/execution/execution/query-with-default.md</id>
4164-
<updated>2025-05-13T18:04:57+09:00</updated>
4165-
4166-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/execution/execution/query-with-default.md b/reference/execution/execution/query-with-default.md
4167-
index 4e4d40838..85520c871 100644
4168-
--- a/reference/execution/execution/query-with-default.md
4169-
+++ b/reference/execution/execution/query-with-default.md
4170-
@@ -14,7 +14,7 @@ constexpr decltype(auto) query-with-default(
4171-
## 概要
4172-
`query-with-default`は、実行制御ライブラリの仕様定義で用いられる説明専用の関数テンプレートである。
4173-
4174-
-説明用の式`e`を、適格であるならば`Tag()(env)`とする。そうでなければ、`staitc_cast&amp;lt;Default&amp;gt;(`[`std::forward`](/reference/utility/forward.md)`&amp;lt;Default&amp;gt;(value))`とする。
4175-
+説明用の式`e`を、適格であるならば`Tag()(env)`とする。そうでなければ、`static_cast&amp;lt;Default&amp;gt;(`[`std::forward`](/reference/utility/forward.md)`&amp;lt;Default&amp;gt;(value))`とする。
4176-
4177-
4178-
## 戻り値
4179-
&lt;/code&gt;&lt;/pre&gt;</summary>
4180-
4181-
<author>
4182-
<name>Raclamusi</name>
4183-
<email>[email protected]</email>
4184-
</author>
4185-
</entry>
4186-
4187-
<entry>
4188-
<title>sender -- typo修正とNGワード追加</title>
4189-
<link href="https://cpprefjp.github.io/reference/execution/execution/sender.html"/>
4190-
<id>4a750d84b5b319ec2360d43b1748873cd765d56e:reference/execution/execution/sender.md</id>
4191-
<updated>2025-05-13T18:04:57+09:00</updated>
4192-
4193-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/execution/execution/sender.md b/reference/execution/execution/sender.md
4194-
index 5f6e98eac..479fede9f 100644
4195-
--- a/reference/execution/execution/sender.md
4196-
+++ b/reference/execution/execution/sender.md
4197-
@@ -62,7 +62,7 @@ concept sender =
4198-
4199-
4200-
## 備考
4201-
-`sender`コンセプトの制約式に現れる第1項`bool(enable-sender&amp;lt;...&amp;gt;)`は[原子制約(atomic contraint)](/lang/cpp20/concepts.md)を構成する。
4202-
+`sender`コンセプトの制約式に現れる第1項`bool(enable-sender&amp;lt;...&amp;gt;)`は[原子制約(atomic constraint)](/lang/cpp20/concepts.md)を構成する。
4203-
これによりオーバーロード解決時の優先順比較において`enable-sender`コンセプトの`||`を単純なOR条件とみなせ、コンパイル時の複雑な包摂関係計算コストを抑制できる。
4204-
4205-
4206-
&lt;/code&gt;&lt;/pre&gt;</summary>
4207-
4208-
<author>
4209-
<name>Raclamusi</name>
4210-
<email>[email protected]</email>
4211-
</author>
4212-
</entry>
4213-
42144141
</feed>

sitemap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12967,7 +12967,7 @@
1296712967

1296812968
<url>
1296912969
<loc>https://cpprefjp.github.io/reference/flat_map/flat_map.html</loc>
12970-
<lastmod>2025-04-03T12:32:11+09:00</lastmod>
12970+
<lastmod>2025-05-14T15:27:50+09:00</lastmod>
1297112971
<changefreq>daily</changefreq>
1297212972
<priority>0.7</priority>
1297312973
</url>

0 commit comments

Comments
 (0)