Skip to content

Commit 801a924

Browse files
author
cpprefjp-autoupdate
committed
update automatically
1 parent 478a1e7 commit 801a924

File tree

3 files changed

+35
-297
lines changed

3 files changed

+35
-297
lines changed

reference/stop_token/stop_source/op_constructor.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@
200200

201201
<p class="text-right"><small>
202202
最終更新日時(UTC):
203-
<span itemprop="datePublished" content="2025-11-18T06:40:58">
204-
2025年11月18日 06時40分58秒
203+
<span itemprop="datePublished" content="2025-11-18T06:51:48">
204+
2025年11月18日 06時51分48秒
205205
</span>
206206
<br/>
207207
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
@@ -263,10 +263,10 @@ <h2>例</h2>
263263
<span class="n"><a href="../stop_source.html">std::stop_source</a></span> <span class="n">ss3</span> <span class="o">=</span> <span class="n">ss1</span><span class="p">;</span>
264264
<span class="n"><a href="../stop_source.html">std::stop_source</a></span> <span class="n">ss4</span> <span class="o">=</span> <span class="n"><a href="../../utility/move.html">std::move</a></span><span class="p">(</span><span class="n">ss1</span><span class="p">);</span>
265265

266-
<span class="n"><a href="../../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n">ss1</span><span class="p">.</span><span class="n">stop_possible</span><span class="p">()</span> <span class="o">==</span> <span class="nb">false</span><span class="p">);</span>
267-
<span class="n"><a href="../../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n">ss2</span><span class="p">.</span><span class="n">stop_possible</span><span class="p">()</span> <span class="o">==</span> <span class="nb">false</span><span class="p">);</span>
268-
<span class="n"><a href="../../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n">ss3</span><span class="p">.</span><span class="n">stop_possible</span><span class="p">()</span> <span class="o">==</span> <span class="nb">true</span><span class="p">);</span>
269-
<span class="n"><a href="../../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n">ss4</span><span class="p">.</span><span class="n">stop_possible</span><span class="p">()</span> <span class="o">==</span> <span class="nb">true</span><span class="p">);</span>
266+
<span class="n"><a href="../../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n">ss1</span><span class="p">.</span><span class="n"><a href="stop_possible.html">stop_possible()</a></span> <span class="o">==</span> <span class="nb">false</span><span class="p">);</span>
267+
<span class="n"><a href="../../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n">ss2</span><span class="p">.</span><span class="n"><a href="stop_possible.html">stop_possible()</a></span> <span class="o">==</span> <span class="nb">false</span><span class="p">);</span>
268+
<span class="n"><a href="../../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n">ss3</span><span class="p">.</span><span class="n"><a href="stop_possible.html">stop_possible()</a></span> <span class="o">==</span> <span class="nb">true</span><span class="p">);</span>
269+
<span class="n"><a href="../../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n">ss4</span><span class="p">.</span><span class="n"><a href="stop_possible.html">stop_possible()</a></span> <span class="o">==</span> <span class="nb">true</span><span class="p">);</span>
270270

271271
<span class="n">ss3</span><span class="p">.</span><span class="n"><a href="request_stop.html">request_stop()</a></span><span class="p">;</span>
272272

rss.xml

Lines changed: 28 additions & 290 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,36 @@
22
<feed xmlns="http://www.w3.org/2005/Atom">
33
<title>cpprefjp - C++日本語リファレンス</title>
44
<link href="https://cpprefjp.github.io" />
5-
<updated>2025-11-18T06:45:01.790010</updated>
6-
<id>9be9a6b2-0833-46b5-b0eb-4582c3ad1abc</id>
5+
<updated>2025-11-18T06:56:01.955067</updated>
6+
<id>9579f137-e9fc-4c08-bd71-7295247ccfbe</id>
77

88

9+
<entry>
10+
<title>コンストラクタ -- stop_sourceのコンストラクタ : さらにコード修飾を追加</title>
11+
<link href="https://cpprefjp.github.io/reference/stop_token/stop_source/op_constructor.html"/>
12+
<id>69e0ab8414039815eade662cee420c947f654ab9:reference/stop_token/stop_source/op_constructor.md</id>
13+
<updated>2025-11-18T15:51:48+09:00</updated>
14+
15+
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/stop_token/stop_source/op_constructor.md b/reference/stop_token/stop_source/op_constructor.md
16+
index d0286e3f1..4ec0e0a4a 100644
17+
--- a/reference/stop_token/stop_source/op_constructor.md
18+
+++ b/reference/stop_token/stop_source/op_constructor.md
19+
@@ -57,6 +57,7 @@ int main()
20+
* std::move[link /reference/utility/move.md]
21+
* std::stop_source[link ../stop_source.md]
22+
* std::nostopstate[link ../nostopstate.md]
23+
+* stop_possible()[link stop_possible.md]
24+
* stop_requested()[link stop_requested.md]
25+
* request_stop()[link request_stop.md]
26+
27+
&lt;/code&gt;&lt;/pre&gt;</summary>
28+
29+
<author>
30+
<name>Akira Takahashi</name>
31+
<email>[email protected]</email>
32+
</author>
33+
</entry>
34+
935
<entry>
1036
<title>コンストラクタ -- stop_sourceのコンストラクタ : コード修飾を追加</title>
1137
<link href="https://cpprefjp.github.io/reference/stop_token/stop_source/op_constructor.html"/>
@@ -1107,294 +1133,6 @@ index 000000000..3476e9e9a
11071133
+
11081134
+## 参照
11091135
+- [P3168R2 Give std::optional Range Support](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3168r2.html)
1110-
&lt;/code&gt;&lt;/pre&gt;</summary>
1111-
1112-
<author>
1113-
<name>suomesta</name>
1114-
<email>[email protected]</email>
1115-
</author>
1116-
</entry>
1117-
1118-
<entry>
1119-
<title>basic_string -- add basic_string::subview() and basic_string_view::subview(). (#1503)</title>
1120-
<link href="https://cpprefjp.github.io/reference/string/basic_string.html"/>
1121-
<id>b403dd0898f3d135bd1fae41157a9aee45ebe9b3:reference/string/basic_string.md</id>
1122-
<updated>2025-11-10T22:21:07+09:00</updated>
1123-
1124-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/string/basic_string.md b/reference/string/basic_string.md
1125-
index ba8e94fcc..c4682fac5 100644
1126-
--- a/reference/string/basic_string.md
1127-
+++ b/reference/string/basic_string.md
1128-
@@ -145,6 +145,7 @@ namespace std {
1129-
| [`find_first_not_of`](basic_string/find_first_not_of.md) | 先頭から、指定文字が見つからない位置を検索する | |
1130-
| [`find_last_not_of`](basic_string/find_last_not_of.md) | 末尾から、指定文字が見つからない位置を検索する | |
1131-
| [`substr`](basic_string/substr.md) | 部分文字列を取得する | |
1132-
+| [`subview`](basic_string/subview.md) | 部分文字列の[`std::basic_string_view`](/reference/string_view/basic_string_view.md)を構築する | C++26 |
1133-
| [`compare`](basic_string/compare.md) | 他の文字列との比較を行う | |
1134-
| [`starts_with`](basic_string/starts_with.md) | 指定の文字列で始まるかを判定する | C++20 |
1135-
| [`ends_with`](basic_string/ends_with.md) | 指定の文字列で終わるかを判定する | C++20 |
1136-
&lt;/code&gt;&lt;/pre&gt;</summary>
1137-
1138-
<author>
1139-
<name>suomesta</name>
1140-
<email>[email protected]</email>
1141-
</author>
1142-
</entry>
1143-
1144-
<entry>
1145-
<title>subview -- add basic_string::subview() and basic_string_view::subview(). (#1503)</title>
1146-
<link href="https://cpprefjp.github.io/reference/string/basic_string/subview.html"/>
1147-
<id>b403dd0898f3d135bd1fae41157a9aee45ebe9b3:reference/string/basic_string/subview.md</id>
1148-
<updated>2025-11-10T22:21:07+09:00</updated>
1149-
1150-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/string/basic_string/subview.md b/reference/string/basic_string/subview.md
1151-
new file mode 100644
1152-
index 000000000..364409e34
1153-
--- /dev/null
1154-
+++ b/reference/string/basic_string/subview.md
1155-
@@ -0,0 +1,90 @@
1156-
+# subview
1157-
+* string[meta header]
1158-
+* std[meta namespace]
1159-
+* basic_string[meta class]
1160-
+* function[meta id-type]
1161-
+* cpp26[meta cpp]
1162-
+
1163-
+```cpp
1164-
+constexpr basic_string_view&amp;lt;charT, traits&amp;gt;
1165-
+ subview(size_type pos = 0,
1166-
+ size_type n = npos) const;
1167-
+```
1168-
+
1169-
+## 概要
1170-
+部分文字列の[`std::basic_string_view`](/reference/string_view/basic_string_view.md)を構築する。
1171-
+`pos`番目から`n`要素の[`std::basic_string_view`](/reference/string_view/basic_string_view.md)を返す。
1172-
+引数省略時は、先頭位置(`0`番目)から全要素(`npos`)の文字列を返す。
1173-
+
1174-
+
1175-
+## 要件
1176-
+`pos &amp;lt;=` [`size()`](size.md)
1177-
+
1178-
+
1179-
+## 効果
1180-
+次と等価 : `return` [`basic_string_view`](/reference/string_view/basic_string_view.md)`&amp;lt;charT, traits&amp;gt;(*this).`[`subview`](/reference/string_view/basic_string_view/subview.md)`(pos, n)`。
1181-
+
1182-
+
1183-
+## 注意
1184-
+本関数は使い方を誤ると、ぶら下がり参照が発生し得る。
1185-
+```cpp example
1186-
+#include &amp;lt;print&amp;gt;
1187-
+#include &amp;lt;string&amp;gt;
1188-
+#include &amp;lt;string_view&amp;gt;
1189-
+
1190-
+int main() {
1191-
+ // OK
1192-
+ std::string s(3, &amp;#39;A&amp;#39;);
1193-
+ std::string_view sv = s.subview();
1194-
+ std::println(&amp;#34;{}&amp;#34;, sv);
1195-
+
1196-
+ // OK
1197-
+ std::println(&amp;#34;{}&amp;#34;, std::string(3, &amp;#39;A&amp;#39;).subview());
1198-
+
1199-
+ // NG!
1200-
+ std::string_view d = std::string(3, &amp;#39;A&amp;#39;).subview(); // ぶら下がり参照発生
1201-
+ std::println(&amp;#34;{}&amp;#34;, d); // 不定動作
1202-
+}
1203-
+```
1204-
+
1205-
+
1206-
+## 例
1207-
+```cpp example
1208-
+#include &amp;lt;iostream&amp;gt;
1209-
+#include &amp;lt;string&amp;gt;
1210-
+#include &amp;lt;string_view&amp;gt;
1211-
+
1212-
+int main() {
1213-
+ std::string s = &amp;#34;Hello world!&amp;#34;;
1214-
+
1215-
+ std::string_view sv = s.subview(6, 5);
1216-
+
1217-
+ std::cout &amp;lt;&amp;lt; sv;
1218-
+}
1219-
+```
1220-
+* subview[color ff0000]
1221-
+
1222-
+### 出力
1223-
+```
1224-
+world
1225-
+```
1226-
+
1227-
+
1228-
+## バージョン
1229-
+### 言語
1230-
+- C++26
1231-
+
1232-
+### 処理系
1233-
+- [Clang](/implementation.md#clang): ??
1234-
+- [GCC](/implementation.md#gcc): ??
1235-
+- [ICC](/implementation.md#icc): ??
1236-
+- [Visual C++](/implementation.md#visual_cpp): ??
1237-
+
1238-
+
1239-
+## 参照
1240-
+
1241-
+- [P3044R2 sub-string_view from string](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3044r2.pdf)
1242-
+
1243-
+
1244-
+## 関連項目
1245-
+- [`basic_string_view::subview`](/reference/string_view/basic_string_view/subview.md)
1246-
&lt;/code&gt;&lt;/pre&gt;</summary>
1247-
1248-
<author>
1249-
<name>suomesta</name>
1250-
<email>[email protected]</email>
1251-
</author>
1252-
</entry>
1253-
1254-
<entry>
1255-
<title>basic_string_view -- add basic_string::subview() and basic_string_view::subview(). (#1503)</title>
1256-
<link href="https://cpprefjp.github.io/reference/string_view/basic_string_view.html"/>
1257-
<id>b403dd0898f3d135bd1fae41157a9aee45ebe9b3:reference/string_view/basic_string_view.md</id>
1258-
<updated>2025-11-10T22:21:07+09:00</updated>
1259-
1260-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/string_view/basic_string_view.md b/reference/string_view/basic_string_view.md
1261-
index a3c916a8b..ada82c5ce 100644
1262-
--- a/reference/string_view/basic_string_view.md
1263-
+++ b/reference/string_view/basic_string_view.md
1264-
@@ -94,6 +94,7 @@ string_view hello = sv.substr(0, 5); // 先頭5文字を抽出する
1265-
|------|------|----------------|
1266-
| [`copy`](basic_string_view/copy.md) | 他の文字列に、自身の文字列をコピーする | C++17 |
1267-
| [`substr`](basic_string_view/substr.md) | 部分文字列を取得する | C++17 |
1268-
+| [`subview`](basic_string_view/subview.md) | 部分文字列を取得する | C++26 |
1269-
| [`compare`](basic_string_view/compare.md) | 他の文字列との比較を行う | C++17 |
1270-
| [`starts_with`](basic_string_view/starts_with.md) | 指定の文字列で始まるかを判定する | C++20 |
1271-
| [`ends_with`](basic_string_view/ends_with.md) | 指定の文字列で終わるかを判定する | C++20 |
1272-
&lt;/code&gt;&lt;/pre&gt;</summary>
1273-
1274-
<author>
1275-
<name>suomesta</name>
1276-
<email>[email protected]</email>
1277-
</author>
1278-
</entry>
1279-
1280-
<entry>
1281-
<title>substr -- add basic_string::subview() and basic_string_view::subview(). (#1503)</title>
1282-
<link href="https://cpprefjp.github.io/reference/string_view/basic_string_view/substr.html"/>
1283-
<id>b403dd0898f3d135bd1fae41157a9aee45ebe9b3:reference/string_view/basic_string_view/substr.md</id>
1284-
<updated>2025-11-10T22:21:07+09:00</updated>
1285-
1286-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/string_view/basic_string_view/substr.md b/reference/string_view/basic_string_view/substr.md
1287-
index 2974a14df..db451e948 100644
1288-
--- a/reference/string_view/basic_string_view/substr.md
1289-
+++ b/reference/string_view/basic_string_view/substr.md
1290-
@@ -65,3 +65,7 @@ int main()
1291-
- [GCC](/implementation.md#gcc): 7.1 [mark verified]
1292-
- [ICC](/implementation.md#icc): ??
1293-
- [Visual C++](/implementation.md#visual_cpp): ??
1294-
+
1295-
+
1296-
+## 関連項目
1297-
+- [`subview`](subview.md)
1298-
&lt;/code&gt;&lt;/pre&gt;</summary>
1299-
1300-
<author>
1301-
<name>suomesta</name>
1302-
<email>[email protected]</email>
1303-
</author>
1304-
</entry>
1305-
1306-
<entry>
1307-
<title>subview -- add basic_string::subview() and basic_string_view::subview(). (#1503)</title>
1308-
<link href="https://cpprefjp.github.io/reference/string_view/basic_string_view/subview.html"/>
1309-
<id>b403dd0898f3d135bd1fae41157a9aee45ebe9b3:reference/string_view/basic_string_view/subview.md</id>
1310-
<updated>2025-11-10T22:21:07+09:00</updated>
1311-
1312-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/string_view/basic_string_view/subview.md b/reference/string_view/basic_string_view/subview.md
1313-
new file mode 100644
1314-
index 000000000..6f098e061
1315-
--- /dev/null
1316-
+++ b/reference/string_view/basic_string_view/subview.md
1317-
@@ -0,0 +1,80 @@
1318-
+# subview
1319-
+* string_view[meta header]
1320-
+* std[meta namespace]
1321-
+* basic_string_view[meta class]
1322-
+* function[meta id-type]
1323-
+* cpp26[meta cpp]
1324-
+
1325-
+```cpp
1326-
+constexpr basic_string_view&amp;lt;charT, traits&amp;gt;
1327-
+ subview(size_type pos = 0,
1328-
+ size_type n = npos) const;
1329-
+```
1330-
+
1331-
+## 概要
1332-
+部分文字列を取得する。
1333-
+
1334-
+本関数は[`substr`](substr.md)と全く同じ動作である。[`std::string`](/reference/string/basic_string.md)とインターフェースを揃える目的で追加された。
1335-
+
1336-
+
1337-
+## 戻り値
1338-
+指定された位置`pos`から`n`文字からなる部分文字列を構築して返す。
1339-
+
1340-
+[`size()`](size.md) `- pos`と`n`うち、小さい方を`rlen`とし、`basic_string_view(`[`data()`](data.md) `+ pos, rlen)`を返す。
1341-
+
1342-
+
1343-
+## 例外
1344-
+`pos &amp;gt;` [`size()`](size.md)の場合、[`std::out_of_range`](/reference/stdexcept.md)例外を送出する。
1345-
+
1346-
+
1347-
+## 例
1348-
+```cpp example
1349-
+#include &amp;lt;iostream&amp;gt;
1350-
+#include &amp;lt;string_view&amp;gt;
1351-
+
1352-
+int main()
1353-
+{
1354-
+ std::string_view sv = &amp;#34;This is a pen&amp;#34;;
1355-
+
1356-
+ std::string_view ret1 = sv.subview(5); // 5番目から最後までの文字列を取得
1357-
+ std::string_view ret2 = sv.subview(5, 2); // 5番目から2文字の文字列を取得
1358-
+
1359-
+ std::cout &amp;lt;&amp;lt; &amp;#34;1 : [&amp;#34; &amp;lt;&amp;lt; ret1 &amp;lt;&amp;lt; &amp;#39;]&amp;#39; &amp;lt;&amp;lt; std::endl;
1360-
+ std::cout &amp;lt;&amp;lt; &amp;#34;2 : [&amp;#34; &amp;lt;&amp;lt; ret2 &amp;lt;&amp;lt; &amp;#39;]&amp;#39; &amp;lt;&amp;lt; std::endl;
1361-
+
1362-
+ // subviewはデータを切り取るのではなく、参照位置と参照サイズを変更するだけなので、
1363-
+ // 生ポインタを介せば全体の文字列を復元することはできる。
1364-
+ const char* ret3 = ret1.data() - 5;
1365-
+ std::cout &amp;lt;&amp;lt; &amp;#34;3 : [&amp;#34; &amp;lt;&amp;lt; ret3 &amp;lt;&amp;lt; &amp;#39;]&amp;#39; &amp;lt;&amp;lt; std::endl;
1366-
+}
1367-
+```
1368-
+* subview[color ff0000]
1369-
+* ret1.data()[link data.md]
1370-
+
1371-
+### 出力
1372-
+```
1373-
+1 : [is a pen]
1374-
+2 : [is]
1375-
+3 : [This is a pen]
1376-
+```
1377-
+
1378-
+
1379-
+## バージョン
1380-
+### 言語
1381-
+- C++26
1382-
+
1383-
+### 処理系
1384-
+- [Clang](/implementation.md#clang): ??
1385-
+- [GCC](/implementation.md#gcc): ??
1386-
+- [ICC](/implementation.md#icc): ??
1387-
+- [Visual C++](/implementation.md#visual_cpp): ??
1388-
+
1389-
+
1390-
+## 参照
1391-
+
1392-
+- [P3044R2 sub-string_view from string](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3044r2.pdf)
1393-
+
1394-
+
1395-
+## 関連項目
1396-
+- [`substr`](substr.md)
1397-
+- [`basic_string::subview`](/reference/string/basic_string/subview.md)
13981136
&lt;/code&gt;&lt;/pre&gt;</summary>
13991137

14001138
<author>

sitemap.xml

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

3681036810
<url>
3681136811
<loc>https://cpprefjp.github.io/reference/stop_token/stop_source/op_constructor.html</loc>
36812-
<lastmod>2025-11-18T15:40:58+09:00</lastmod>
36812+
<lastmod>2025-11-18T15:51:48+09:00</lastmod>
3681336813
<changefreq>daily</changefreq>
3681436814
<priority>0.6</priority>
3681536815
</url>

0 commit comments

Comments
 (0)