]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Constrain std::make_optional
authorJonathan Wakely <jwakely@redhat.com>
Mon, 6 Jul 2020 20:54:12 +0000 (21:54 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 6 Jul 2020 20:54:59 +0000 (21:54 +0100)
commitbcfe4681f9be68f96f0610f30356510ff518806b
treef92d49072d3ec20156a3f0bbc6a58d17444344e7
parent8992cd1892df1adb352cf5d5b279a00686d1e88a
libstdc++: Constrain std::make_optional

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.
libstdc++-v3/include/std/optional
libstdc++-v3/testsuite/20_util/optional/make_optional-2.cc [new file with mode: 0644]
This page took 0.057313 seconds and 5 git commands to generate.