Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
8946fb1
clamp : LWG Issueを記載
faithandbrave Aug 24, 2026
ea2c390
sample : LWG Issueを記載
faithandbrave Aug 24, 2026
96027e7
shuffle : LWG Issueを記載
faithandbrave Aug 24, 2026
9a157d9
sort_heap : 計算量の上限が修正された
faithandbrave Aug 24, 2026
6f3fcf1
anyのコンストラクタとemplace : LWG Issueを記載
faithandbrave Aug 24, 2026
8cbf7f9
any_cast : LWG Issueを記載
faithandbrave Aug 24, 2026
9be1f98
array : LWG Issueを追加
faithandbrave Aug 24, 2026
1d4e6f4
assert : LWG Issueを追加
faithandbrave Aug 24, 2026
7f71688
time_pointの減算 : CTに変換するようになった
faithandbrave Aug 24, 2026
7f14068
cmath/abs : LWG Issueを追加
faithandbrave Aug 24, 2026
7a05f05
complexのlogとsqrt : LWG Issueを追加
faithandbrave Aug 24, 2026
84dd51d
complexのpolar : デフォルト引数が0からT()に変更になった。遡及適用
faithandbrave Aug 24, 2026
f5afbf4
Invoke : LWG Issueを追加
faithandbrave Aug 24, 2026
16dc75a
offsetof : LWG Issueを追加
faithandbrave Aug 24, 2026
64bcc45
cstdlib/abs : LWG Issueを追加
faithandbrave Aug 24, 2026
742ce5d
deque::erase : 例外セクションがなかったので追加し、計算量の仕様をより具体化
faithandbrave Aug 24, 2026
548c305
deque, string, vectorのshtink_to_fit : C++17で終端イテレータも無効になることが明確化された
faithandbrave Aug 24, 2026
7f06327
rethrow_if_nested : C++11までの仕様が実装不可能だったのでC++17の仕様見直しで遡及適用
faithandbrave Aug 24, 2026
5396186
terminate : 例外処理中にset_terminateが呼ばれた場合の仕様を明確化。遡及適用
faithandbrave Aug 24, 2026
aa6817a
throw_with_nested : C++11仕様が実装不可能だった仕様についてC++17で見直して遡及適用
faithandbrave Aug 24, 2026
3b3e386
directory_iteratorのコンストラクタ : インクリメント中にエラーが発生した場合に終端イテレータになることが規定された
faithandbrave Aug 24, 2026
fe97e1c
file_statusのコンストラクタ : LWG Issueを追加
faithandbrave Aug 24, 2026
bb5c56d
path : LWG Issueを追加
faithandbrave Aug 24, 2026
bb6fd84
recursive_directory_iterator : 事前条件を追加
faithandbrave Aug 24, 2026
0a028b3
copy_file : LWG Issueを追加し、仕様コードの説明が間違っていたのを修正
faithandbrave Aug 24, 2026
1e2d156
create_directory, create_directories : LWG Issueを追加
faithandbrave Aug 24, 2026
d0ad700
filesystem::equivalent : エラー条件を例外から効果に移動し、C++17とC++20でエラー条件整理
faithandbrave Aug 24, 2026
e783b59
filesystem::is_empty : LWG Issueを追加
faithandbrave Aug 24, 2026
fedcf98
permissions : (3)の例外条件を記載
faithandbrave Aug 24, 2026
e16788d
permissions : シンボリック自体かその先を対象とするかが整理された
faithandbrave Aug 24, 2026
72bcfef
filesystem::remove_all : 事後条件の追加と、シンボリックリンクを削除することが規定された
faithandbrave Aug 24, 2026
b26257d
filesystem::status, symlink_status : LWG Issueを追加
faithandbrave Aug 24, 2026
2353144
ファイル関係のコンストラクタとopen : LWG Issueを追加
faithandbrave Aug 24, 2026
0618d01
basic_filebuf : seekposとsyncを追加 (C++17でDRがあった機能)
faithandbrave Aug 24, 2026
f126626
functionのコンストラクタ : C++17のいくつかのLWG Issueに対応し、効果と例外条件のC++17動作を記載
faithandbrave Aug 24, 2026
e2e027c
swap(function) : C++17でnoexceptを追加
faithandbrave Aug 24, 2026
2acb16a
function::target : C++17で要件削除
faithandbrave Aug 24, 2026
86d807e
greater, less, greater_equal, less_equalのvoid版 : ポインタ比較が全順序であることが規定された
faithandbrave Aug 24, 2026
36086a3
hash : 処理系の拡張整数型が提供されることが明確化
faithandbrave Aug 24, 2026
fae1b1f
functional::invoke : LWG Issueを追加
faithandbrave Aug 24, 2026
b111b64
mem_fn : C++17仕様として完全転送することが要求されるようになった
faithandbrave Aug 24, 2026
c5ef60a
future::get : LWG Issueを追加
faithandbrave Aug 24, 2026
0b216c3
future::share : C++17でnoexceptが追加されvalidでなければ無効なshared_futureが返ることになった
faithandbrave Aug 24, 2026
aeb3089
packaged_taskのコンストラクタ : LWG Issueを追加
faithandbrave Aug 24, 2026
c939406
packaged_taskのuses_allocator : 削除し忘れ機能であったためC++20で削除
faithandbrave Aug 24, 2026
e8c12ef
promise::set_exception関係 : 事前条件を追加
faithandbrave Aug 24, 2026
751a85f
packaged_task : uses_allocator削除
faithandbrave Aug 24, 2026
da97f27
futureのasync : bad_allocが送出される可能性を記載
faithandbrave Aug 24, 2026
95d8324
ios_base::failure : system_errorからの派生ではなく別名で定義してもよいことが規定された
faithandbrave Aug 24, 2026
f0b93f9
basic_istreamの入力ストリーム演算子 : C++17での制約追加とforward仕様を追加
faithandbrave Aug 24, 2026
5baf178
basic_istream::seekg : C++17が仕様説明の編集上の誤り修正が遡及適用
faithandbrave Aug 24, 2026
67fc54b
istream_iteratorのコンストラクタ : LWG Issueを追加
faithandbrave Aug 24, 2026
24b66d8
istreambuf_iteratorのアロー演算子 : 仕様が定まらなかったのでC++17で削除
faithandbrave Aug 24, 2026
411c499
istreambuf_iteratorのコンストラクタ : ヌルポインタが指定されると終端イテレータが作られる仕様が遡及適用
faithandbrave Aug 24, 2026
d2c039f
istream_iterator : C++17で要件を追加。遡及適用
faithandbrave Aug 24, 2026
08e4a4b
list::sort : ソート中に例外が送出された場合に要素順が未規定になることを記載
faithandbrave Aug 24, 2026
783104a
locale::name : C++17で不要な文言を削除。遡及適用
faithandbrave Aug 24, 2026
943fe43
num_get: C++17 LWG Issue対応のためにdo_get, getメンバ関数のページを追加
faithandbrave Aug 24, 2026
1f46523
map, unordered_mapの添字演算子 : C++17でtry_emplaceベースの仕様になった
faithandbrave Aug 24, 2026
5c23129
raw_storage_iterator : C++17でムーブのオーバーロードと制約が追加された
faithandbrave Aug 24, 2026
dc2fb26
dynamic_pointer_cast : C++17 / C++20の適格要件と事前条件を追加
faithandbrave Aug 24, 2026
c4a0500
well-defined (behavior) の訳語を定義
faithandbrave Aug 24, 2026
a41c8a2
shared_ptrのコンストラクタ : C++17で要件を追加
faithandbrave Aug 24, 2026
a35462d
shared_ptrの小なり比較 : LWG Issueを追加
faithandbrave Aug 24, 2026
16f0cee
unique_ptr : LWG Issueを追加
faithandbrave Aug 24, 2026
6eb6ea4
weak_ptr::owner_before : LWG Issueを追加
faithandbrave Aug 24, 2026
ae1c2ea
weak_ptr : 配列版に合わせてelement_typeの定義を変更
faithandbrave Aug 24, 2026
2d5d926
allocator_arg_t : LWG Issueを追加
faithandbrave Aug 24, 2026
afc8c03
make_shared : LWG Issueを追加
faithandbrave Aug 24, 2026
2990513
memory_resource : LWG Issueを追加
faithandbrave Aug 24, 2026
ec582a6
LWG Issueを追加
faithandbrave Aug 24, 2026
7a2dac2
optionalのコンストラクタ : LWG Issueを追加
faithandbrave Aug 24, 2026
844c106
basic_ostreamの出力ストリーム演算子 : C++17で制約を追加
faithandbrave Aug 24, 2026
dfbe784
priority_queueのコンストラクタ : LWG Issueを追加
faithandbrave Aug 24, 2026
ea23b34
priority_queue : 適格要件とvalue_compareをC++17で追加
faithandbrave Aug 24, 2026
cc6e0b2
queue, stack : C++17で適格要件を追加
faithandbrave Aug 24, 2026
db40070
match_results : 等値比較演算子の意味論がコンテナと異なることが明確化された
faithandbrave Aug 24, 2026
009bde1
regex_match : LWG Issueを追加
faithandbrave Aug 24, 2026
6ccee7d
scoped_allocator_adaptorのコンストラクタ : C++17で制約が整理された
faithandbrave Aug 24, 2026
3b3fee9
scoped_allocator_adaptor : C++17でコピー代入とムーブ代入が追加された
faithandbrave Aug 24, 2026
4a9f79d
basic_string : C++17で適格要件を追加
faithandbrave Aug 24, 2026
bef8e82
basic_string::assign : アロケータ伝播がされるようC++17で効果を見直し
faithandbrave Aug 24, 2026
168053f
basic_stringのdata : 非const版が参照、ポインタ、イテレータを無効にしないことを記載
faithandbrave Aug 24, 2026
36b8bec
basic_stringの添字演算子 : LWG Issueを追加
faithandbrave Aug 24, 2026
6e0fa16
error_condition : C++17でhashの特殊化が追加された
faithandbrave Aug 24, 2026
e81e41b
tuple : C++17でトリビアルに破棄可能
faithandbrave Aug 24, 2026
85900e8
tupleのコンストラクタ: LWG Issueを追加
faithandbrave Aug 24, 2026
c49c32b
tupleの代入演算子 : C++17で一部の要件を満たさない場合にdelete定義されるようになった
faithandbrave Aug 24, 2026
6ad3629
ignore : LWG Issueを追加
faithandbrave Aug 24, 2026
cc8fede
tuple_element : 適格要件の記載漏れを修正
faithandbrave Aug 24, 2026
93d7a4c
add_lvalue_reference, add_rvalue_reference, add_poinetr : 参照可能でない型で不適…
faithandbrave Aug 24, 2026
b521880
conjunction, disjunction : 要件見直し
faithandbrave Aug 24, 2026
74a0fd3
is_literal_type : LWG Issueを追加
faithandbrave Aug 24, 2026
51a0aec
is_trivially_(assignable | constructible) : declval呼び出しをトリビアルとみなるよう規定…
faithandbrave Aug 24, 2026
f1caa64
is_trivially_destructible : トリビアルに破棄可能な条件が見直された
faithandbrave Aug 24, 2026
df7b069
negation : LWG Issueを追加
faithandbrave Aug 24, 2026
97751fb
result_of : LWG Issueを追加
faithandbrave Aug 24, 2026
b8196a3
unordered連想コンテナのmerge : 不足していた例外セクションを追加
faithandbrave Aug 24, 2026
899fa64
pair : C++17からトリビアルに破棄可能
faithandbrave Aug 24, 2026
61a836e
pairのコンストラクタ : LWG Issueを追加
faithandbrave Aug 24, 2026
e25a99e
pairの代入演算子 : 一部の制約をC++17でdelete定義される条件として記載
faithandbrave Aug 24, 2026
f703be8
pairのtuple_element : 適格要件が追加された
faithandbrave Aug 24, 2026
12c7a45
piecewise_construct_t : LWG Issueを追加
faithandbrave Aug 24, 2026
a72de73
variant : uses_allocatorを削除
faithandbrave Aug 24, 2026
61ba187
variant_alternative : 要件を適格要件に変更
faithandbrave Aug 24, 2026
64f7562
variant::emplace : 丸カッコによる直接初期化で値を初期化することが明確化
faithandbrave Aug 24, 2026
c9437fe
variantの代入演算子 : LWG Issueを追加
faithandbrave Aug 24, 2026
3a99de8
variantのコンストラクタ : 一部の制約をdelete定義される条件に移動
faithandbrave Aug 24, 2026
abcb838
variant::swap : 制約見直しと事前条件の追加
faithandbrave Aug 24, 2026
2778b4e
vector::erase : 例外と計算量が見直された。遡及適用
faithandbrave Aug 24, 2026
f6f34f3
basic_filebuf : 残りのメンバ関数ページを作成
faithandbrave Aug 24, 2026
e8a7d23
num_get : 残りのメンバ関数ページを作成
faithandbrave Aug 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions reference/algorithm/clamp.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,5 @@ int main()
## 参照
- [N4536 An algorithm to "clamp" a value between a pair of boundary values](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4536.html)
- [P0025R0 An algorithm to "clamp" a value between a pair of boundary values (revision 1)](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0025r0.html)
- [LWG Issue 2688. `clamp` misses preconditions and has extraneous condition on result](https://cplusplus.github.io/LWG/issue2688)
- C++17で、事前条件(`low`は`high`より大きくてはならない)が追加され、戻り値の規定が整理された
2 changes: 2 additions & 0 deletions reference/algorithm/sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,5 @@ bcd
- [N4531 `std::rand` replacement, revision 3](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4531.html)
- [P0220R0 Adopt Library Fundamentals TS for C++17](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0220r0.html)
- [P0220R1 Adopt Library Fundamentals V1 TS Components for C++17 (R1)](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0220r1.html)
- [LWG Issue 2716. Specification of `shuffle` and `sample` disallows lvalue URNGs](https://cplusplus.github.io/LWG/issue2716)
- C++17で、乱数生成器の要件が`remove_reference_t`を通して判定されるよう整理され、左辺値の乱数生成器を渡せることが明確化された
2 changes: 2 additions & 0 deletions reference/algorithm/shuffle.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,7 @@ void shuffle(RandomAccessIterator first, RandomAccessIterator last, UniformRando
- [`ranges::shuffle`](/reference/algorithm/ranges_shuffle.md)

## 参照
- [LWG Issue 2716. Specification of `shuffle` and `sample` disallows lvalue URNGs](https://cplusplus.github.io/LWG/issue2716)
- C++17で、乱数生成器の要件が`remove_reference_t`を通して判定されるよう整理され、左辺値の乱数生成器を渡せることが明確化された
- [P0346R1 A `<random>` Nomenclature Tweak](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0346r1.pdf)
- URNGをURBGに変更
4 changes: 3 additions & 1 deletion reference/algorithm/sort_heap.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace std {


## 計算量
最大で N log(N) 回比較する(N == `last - first`)
最大で 2N log(N) 回比較する(N == `last - first`)


## 例
Expand Down Expand Up @@ -85,3 +85,5 @@ int main()

## 参照
- [P0879R0 Constexpr for `swap` and `swap` related functions](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0879r0.html)
- [LWG Issue 2444. Inconsistent complexity for `std::sort_heap`](https://cplusplus.github.io/LWG/issue2444)
- 計算量の上限が「N log(N)回」から「2N log(N)回」に修正された(`sort_heap`はN回の`pop_heap`を行うため)。この修正は欠陥報告(DR)であり、C++17にも遡及して適用される
2 changes: 2 additions & 0 deletions reference/any/any/emplace.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@ int main()
## 参照
- [LWG Issue 2746. Inconsistency between requirements for `emplace` between `optional` and `variant`](https://cplusplus.github.io/LWG/issue2746)
- C++26で、`emplace`の制約が`Requires`(ハードエラー)から`Constraints`(SFINAE)に統一された(cpprefjpでは「テンプレートパラメータ制約」として記載済み)
- [LWG Issue 2754. The `in_place` constructors and `emplace` functions added by P0032R3 don't require `CopyConstructible`](https://cplusplus.github.io/LWG/issue2754)
- C++17で、`emplace`に、格納する型がコピー構築可能であることの要件が追加された
7 changes: 7 additions & 0 deletions reference/any/any/op_constructor.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,10 @@ int main()
- [GCC](/implementation.md#gcc): 7.3 [mark verified]
- [ICC](/implementation.md#icc): ??
- [Visual C++](/implementation.md#visual_cpp): ??


## 参照
- [LWG Issue 2744. `any`'s `in_place` constructors](https://cplusplus.github.io/LWG/issue2744)
- C++17で、`in_place_type_t`を取るコンストラクタの`is_constructible`要件がオーバーロード解決参加条件(SFINAE)へ変更され、`any`に対する`is_constructible`問い合わせが正しい結果を返すようになった
- [LWG Issue 2754. The `in_place` constructors and `emplace` functions added by P0032R3 don't require `CopyConstructible`](https://cplusplus.github.io/LWG/issue2754)
- C++17で、`in_place_type_t`を取るコンストラクタに、格納する型がコピー構築可能であることの要件が追加された
4 changes: 4 additions & 0 deletions reference/any/any_cast.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,8 @@ int main()

## 参照

- [LWG Issue 2768. `any_cast` and move semantics](https://cplusplus.github.io/LWG/issue2768)
- C++17で、`any_cast(any&&)`版がムーブによる取り出しや右辺値参照の取得を行えるよう規定された(LWG 2769の解決に取り込まれた)
- [LWG Issue 2769. Redundant const in the return type of `any_cast(const any&)`](https://cplusplus.github.io/LWG/issue2769)
- C++17で、`any_cast`の戻り値規定から冗長な`const`付与を除き、`U = remove_cv_t<remove_reference_t<ValueType>>`と`static_cast<ValueType>`を用いる形へ整理された(一時オブジェクトへのダングリング参照取得も防止)
- [LWG Issue 3305. `any_cast<void>`](https://cplusplus.github.io/LWG/issue3305)
4 changes: 4 additions & 0 deletions reference/array/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,7 @@ int main()


## 参照
- [LWG Issue 2590. Aggregate initialization for `std::array`](https://cplusplus.github.io/LWG/issue2590)
- C++17で、`array`がコピーリスト初期化に限らず集成体初期化一般で初期化できることが明確化された(`std::array<int, 1> a{0};`のような直接波カッコ初期化も適格)
- [LWG Issue 2310. Public exposition only member in `std::array`](https://cplusplus.github.io/LWG/issue2310)
- C++17で、`array`が集成体であることを示す説明専用メンバ(`elems`)がpublicである旨が明確化され、`data()`の規定が`addressof(front())`を用いる形に整理された
2 changes: 2 additions & 0 deletions reference/cassert/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ int main()
- [What does it mean for C++ that assert takes a scalar argument?](https://groups.google.com/a/isocpp.org/d/topic/std-discussion/6EHDRo1A2EE/discussion)
パラメータの式の型についての要件は参照規格であるCの規定によるものであり、「スカラ型」が[C++におけるスカラ型](/reference/type_traits/is_scalar.md)となるのか、あるいはCにおけるスカラ型の範囲に限定されるのか、少なくともC++14時点でははっきりしていない。
- [LWG Issue 2234. `assert()` should allow usage in constant expressions](http://wg21.cmeerw.net/lwg/issue2234)
- [LWG Issue 2559. Error in LWG 2234's resolution](https://cplusplus.github.io/LWG/issue2559)
- C++17で、`assert(E)`が定数部分式となる条件を、`assert`が最後に定義/再定義された時点の`NDEBUG`の状態で判定するよう修正された
- [P2264R7 Make `assert()` macro user friendly for C and C++](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2264r7.html)
- C++26から、カンマを含む式を条件式として使用できるようになった
- [LWG Issue 4454. `assert` should forbid `co_await` and `co_yield`](https://cplusplus.github.io/LWG/issue4454)
Expand Down
7 changes: 5 additions & 2 deletions reference/chrono/time_point/op_minus.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ namespace chrono {


## 戻り値
- (1)
- (1) : 戻り値の型を`CT`として、

```cpp
return lhs + (-rhs);
return CT(lhs.time_since_epoch() - rhs);
```
* time_since_epoch[link time_since_epoch.md]

- (2)

Expand Down Expand Up @@ -101,3 +102,5 @@ int main()

## 参照
- [N3469 Constexpr Library Additions: chrono, v3](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3469.html)
- [LWG Issue 2739. Issue with `time_point` non-member subtraction with an `unsigned` duration](https://cplusplus.github.io/LWG/issue2739)
- C++17で、(1)の戻り値が`CT(lhs.time_since_epoch() - rhs)`に変更され、符号なし`duration`で負符号化による予期しないオーバーフローが起きないようになった
4 changes: 4 additions & 0 deletions reference/cmath/abs.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,7 @@ namespace std {
- C++23での、一部関数の`constexpr`対応
- [P1467R9 Extended floating-point types and standard names](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1467r9.html)
- C++23で導入された拡張浮動小数点数型への対応として、`float`、`double`、`long double`のオーバーロードを`floating-point-type`のオーバーロードに統合し、拡張浮動小数点数型も扱えるようにした
- [LWG Issue 2192. Validity and return type of `std::abs(0u)` is unclear](https://cplusplus.github.io/LWG/issue2192)
- C++17で、`int`/`long`/`long long`に対するオーバーロード (6)-(8) が追加され、`int`へ整数昇格できない符号なし整数型に対する`abs`の呼び出しが不適格であることが規定された
- [LWG Issue 2735. `std::abs(short)`, `std::abs(signed char)` and others should return `int` instead of `double`](https://cplusplus.github.io/LWG/issue2735)
- C++17で、`abs`は`<cmath>`の整数引数を`double`に変換する追加オーバーロードの対象から除外され、`short`や`signed char`などの引数に対して(整数昇格により)`int`を返すようになった(C++98/Cとの互換性のため)
2 changes: 2 additions & 0 deletions reference/complex/complex/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,5 @@ log( (1,2) ) = (0.804719,1.10715)
## 参照
- [P1383R2 More constexpr for `<cmath>` and `<complex>`](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p1383r2.pdf)
- C++26で`constexpr`対応した
- [LWG Issue 2597. `std::log` misspecified for complex numbers](https://cplusplus.github.io/LWG/issue2597)
- 分岐切断上での挙動(負のゼロの扱い)の意味論がCの`clog`と同じであることを意図する、と整理された。この修正は欠陥報告(DR)であり、C++17にも遡及して適用される
8 changes: 5 additions & 3 deletions reference/complex/complex/polar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ namespace std {
template <class T>
complex<T>
polar(const T& rho,
const T& theta = 0); // (1) C++03
const T& theta = T()); // (1) C++03
template <class T>
constexpr complex<T>
polar(const T& rho,
const T& theta = 0); // (1) C++26
const T& theta = T()); // (1) C++26
}
```

Expand All @@ -27,7 +27,7 @@ namespace std {
## 備考
- 規格には、偏角 `theta` の単位については何も記載がない。しかし、この引数の単位がラジアンであることは異論をはさむ余地はないだろう。
実際、本関数の逆関数(の片割れ)とも言える [`arg`](arg.md) の戻り値はラジアンである。
- コンストラクタのデフォルト引数を踏まえると、偏角 `theta` のデフォルト引数が `T()` ではなく `0` であるのは、規格の誤りであるように思われる
- 偏角 `theta` のデフォルト引数は、当初 `0` と規定されていたが、これは規格の誤りであり、LWG Issue 2870 によって `T()`(テンプレートパラメータに依存する値)に修正された
- `rho` と `theta` に現れる型 `T` は(残念ながら)同じ型でなければならない。(`int` と `double` を渡すなどといったことはできない)
同じ [`<complex>`](/reference/complex.md) ヘッダの [`pow`](pow.md) や、[`cmath`](/reference/cmath.md) ヘッダの [`atan2`](/reference/cmath/atan2.md) などの関数群は、引数の型が異なっていても簡単に呼び出せるように C++11 でオーバーロードが追加されているため、単なる規格の考慮漏れかもしれない。

Expand Down Expand Up @@ -79,5 +79,7 @@ polar(1.0, pi / 4.0) = (0.707107,0.707107)


## 参照
- [LWG Issue 2870. Default value of parameter theta of polar should be dependent](https://cplusplus.github.io/LWG/issue2870)
- 偏角`theta`のデフォルト引数が`0`から`T()`(テンプレートパラメータに依存する値)に修正された。この修正は欠陥報告(DR)であり、C++17以前にも遡及して適用される
- [P1383R2 More constexpr for `<cmath>` and `<complex>`](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p1383r2.pdf)
- C++26で`constexpr`対応した
2 changes: 2 additions & 0 deletions reference/complex/complex/sqrt.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,5 @@ sqrt(-1.0 - 1.0i) = (0.45509,-1.09868)
## 参照
- [P1383R2 More constexpr for `<cmath>` and `<complex>`](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p1383r2.pdf)
- C++26で`constexpr`対応した
- [LWG Issue 2597. `std::log` misspecified for complex numbers](https://cplusplus.github.io/LWG/issue2597)
- 分岐切断上での挙動(負のゼロの扱い)の意味論がCの`clog`と同じであることを意図する、と整理された。この修正は欠陥報告(DR)であり、C++17にも遡及して適用される
2 changes: 2 additions & 0 deletions reference/concepts/Invoke.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@ C++20 における 2. について、次の文言を項目の最後に追加す
- [P0777R1 Treating Unnecessary `decay`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0777r1.pdf)
- C++20から`decay_t`を`remove_cvref_t`へ変更。
- [P2136R3 `invoke_r`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2136r3.html)
- [LWG Issue 2219. `INVOKE`-ing a pointer to member with a `reference_wrapper` as the object expression](https://cplusplus.github.io/LWG/issue2219)
- C++17で、メンバポインタに対する第1引数が[`reference_wrapper`](/reference/functional/reference_wrapper.md)の特殊化である場合に、`t1.get()`経由でメンバを呼び出すよう規定された
- [LWG Issue 3655. The *INVOKE* operation and union types](https://cplusplus.github.io/LWG/issue3655)
- C++23で、メンバポインタの判定を`is_base_of_v`単独から`is_same_v || is_base_of_v`に変更し、共用体(union)型でも正しく扱えるようにした
5 changes: 5 additions & 0 deletions reference/cstddef/offsetof.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@ offsetof(mystruct,singlechar) is 0
offsetof(mystruct,arraymember) is 1
offsetof(mystruct,anotherchar) is 11
```


## 参照
- [LWG Issue 2709. `offsetof` is unnecessarily imprecise](https://cplusplus.github.io/LWG/issue2709)
- C++17で、標準レイアウトでないクラス型に対する`offsetof`の利用が「未定義動作」から「条件付きサポート」に変更された
2 changes: 2 additions & 0 deletions reference/cstdlib/abs.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@ int main()
- C++23での、一部関数の`constexpr`対応
- [P1467R9 Extended floating-point types and standard names](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1467r9.html)
- C++23で導入された拡張浮動小数点数型への対応として、`float`、`double`、`long double`のオーバーロードを`floating-point-type`のオーバーロードに統合し、拡張浮動小数点数型も扱えるようにした
- [LWG Issue 2192. Validity and return type of `std::abs(0u)` is unclear](https://cplusplus.github.io/LWG/issue2192)
- C++17で、`int`へ整数昇格できない符号なし整数型に対する`abs`の呼び出しが不適格であることが規定された
10 changes: 8 additions & 2 deletions reference/deque/deque/erase.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ constexpr iterator erase(const_iterator first, const_iterator last); // (2) C++2


## 戻り値
削除された要素の次の要素を指すイテレータを返す。そのような要素が存在しない場合は、[`end()`](end.md)を返す。さらに、削除された要素以降の要素の数と同じ回数の`T`のムーブ代入演算子が呼ばれる。
削除された要素の次の要素を指すイテレータを返す。そのような要素が存在しない場合は、[`end()`](end.md)を返す。


## 例外
`T`の代入演算子が例外を投げる場合を除いて、この関数は例外を投げない。この関数はメモリの確保・解放や要素の構築を行わないため、コンストラクタは呼ばれない。


## 計算量
削除された要素の数に対して線形時間(デストラクタ呼び出し)。加えて、`position`と終端位置の間にある要素の数に対してライブラリの実装に依存して線形時間で増加する
削除される要素の数と同じ回数の`T`のデストラクタが実行される。加えて`T`の代入演算子が呼ばれるが、その回数は「削除された要素より前にある要素数」と「削除された要素より後にある要素数」のうち少ない方以下となる(`deque`は前後どちらからでも要素を詰められるため)


## 例
Expand Down Expand Up @@ -112,4 +116,6 @@ int main()
## 参照
- [N2350 Container insert/erase and iterator constness (Revision 1)](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2350.pdf)
- [LWG Issue 638. `deque` end invalidation during erase](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#638)
- [LWG Issue 2953. LWG 2853 should apply to `deque::erase` too](https://cplusplus.github.io/LWG/issue2953)
- `erase`はメモリ確保・要素構築を行わないため、例外指定からコンストラクタへの言及が削除され`T`の代入演算子のみとされた(`vector::erase`のLWG 2853と同様)。この修正は欠陥報告(DR)であり、C++17にも遡及して適用される
- [P3372R3 constexpr containers and adaptors](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3372r3.html)
4 changes: 3 additions & 1 deletion reference/deque/deque/shrink_to_fit.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ constexpr void shrink_to_fit(); // (1) C++26
## 効果
- 確保した未使用のメモリ領域を[`size()`](size.md)に縮小させるというリクエストを行う。
- 実装依存の最適化を許可するために、縮小するという動作は仕様上強制されない。
- C++17 : コンテナの要素に対する参照、ポインタ、およびイテレータとそれが指す要素への参照は無効となる
- C++17 : シーケンスの要素を指すすべての参照・ポインタ・イテレータ、および終端イテレータ(past-the-end iterator)が無効となる
- C++17 : コピー挿入可能でない型`T`のムーブコンストラクタによる例外を除き、例外が送出された場合この関数は何もしない。


Expand Down Expand Up @@ -57,4 +57,6 @@ constexpr void shrink_to_fit(); // (1) C++26
- [LWG Issue 850. Should `shrink_to_fit` apply to `std::deque`?](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#850)
- [LWG Issue 2033. Preconditions of `reserve`, `shrink_to_fit`, and `resize` functions](http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2033)
- [LWG Issue 2223. `shrink_to_fit` effect on iterator validity](https://wg21.cmeerw.net/lwg/issue2223)
- [LWG Issue 2834. Resolution to LWG 2223 is missing wording about end iterators](https://cplusplus.github.io/LWG/issue2834)
- C++17で、終端イテレータ(past-the-end iterator)も無効化されることが明確化された
- [P3372R3 constexpr containers and adaptors](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3372r3.html)
Loading
Loading