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

Jonathan Wakely jwakely@redhat.com
Mon Jul 6 21:06:46 GMT 2020


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.





More information about the Libstdc++ mailing list