std::optional defaut constructor

Jonathan Wakely jwakely@redhat.com
Fri Jun 19 11:50:21 GMT 2020


On 04/06/20 14:46 +0100, Jonathan Wakely wrote:
>On 04/06/20 00:50 +0200, Marc Glisse wrote:
>>(I don't currently have a setup that would enable me to commit anything. I'll
>>try to fix it eventually, but likely not so soon)
>
>Ah, I missed this bit. I'll take care of it for you.
>
>If it's due to the Git conversion let me know if it's something I can
>help with off-list.
>
>
>>diff --git a/libstdc++-v3/include/std/optional b/libstdc++-v3/include/std/optional
>>index 37c2ba7a025..e84ba28a806 100644
>>--- a/libstdc++-v3/include/std/optional
>>+++ b/libstdc++-v3/include/std/optional
>>@@ -688,7 +688,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>>    public:
>>      using value_type = _Tp;
>>
>>-      constexpr optional() = default;
>>+      constexpr optional() noexcept { }
>>
>>      constexpr optional(nullopt_t) noexcept { }
>>


Committed to master as r11-1552 bafd12cb22e83b7da8946873513a897e48e2900f




More information about the Libstdc++ mailing list