cpprefjp / site

cpprefjpサイトのMarkdownソース
https://cpprefjp.github.io/
368 stars 152 forks source link

疑問: nullptr_t 引数のコンストラクターに noexcept がない? #1249

Closed kazssym closed 3 weeks ago

kazssym commented 4 months ago

shared_ptr(nullptr_t) のコンストラクターで noexcept がないのは正しいでしょうか

https://github.com/cpprefjp/site/blob/8250474933368f71448e5a3cad3eb78d0f101ed2/reference/memory/shared_ptr/op_constructor.md?plain=1#L53

kazssym commented 4 months ago

これですかね https://cplusplus.github.io/LWG/lwg-defects.html#2365

onihusube commented 4 months ago

[C++20のドラフト](https://timsong-cpp.github.io/cppwp/n4861/util.smartptr.shared#:~:text=constexpr%20shared_ptr(nullptr_t)%20noexcept%20%3A%20shared_ptr()%20%7B%20%7D)だと`noexcept`はついてるので、あるのが正しいですね

ご指摘のLWG Issue2365がC++17に対して適用されたことで付くようになったのだと思われます。このような細かい(個別の提案になってないような)Issueの対応は手が回らない面があります・・・

faithandbrave commented 4 months ago

こちら、どなたが修正されますか? @kazssym さんの方で修正・Pull Requestを作成されますか?

kazssym commented 4 months ago

急ぐ必要がなければ手をつけるかと思いますが、それで良ければ

faithandbrave commented 4 months ago

急いでないので、お手すきのときにお願いします!