[committed 2/3] libstdc++: Constrain std::make_optional

Jonathan Wakely jwakely@redhat.com
Mon Jul 6 21:08:04 GMT 2020


On 06/07/20 22:06 +0100, Jonathan Wakely wrote:
>The standard rquires that std::make_optional is constrained similarly to
>the std::optional constructors, which our implementation fails to do.
>
>As a conforming extension this also adds a noexcept-specifier to each
>std::make_optional overload.
>
>libstdc++-v3/ChangeLog:
>
>        * include/std/optional (make_optional): Add enable_if
>        constraints and noexcept-specifier to each overload.
>        * testsuite/20_util/optional/make_optional-2.cc: New test.
>
>
>Tested powerpc64le-linux, committed to trunk.

And with the patch attached this time ...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 6020 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20200706/e53428b4/attachment-0001.bin>


More information about the Libstdc++ mailing list