public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [committed 2/3] libstdc++: Constrain std::make_optional
Date: Mon, 6 Jul 2020 22:06:46 +0100	[thread overview]
Message-ID: <20200706210646.GD4137376@redhat.com> (raw)
In-Reply-To: <20200706210551.GA750840@redhat.com>

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.




  reply	other threads:[~2020-07-06 21:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 21:05 [committed 1/3] libstdc++: Add noexcept to std::optional initialization (PR 96036) Jonathan Wakely
2020-07-06 21:06 ` Jonathan Wakely [this message]
2020-07-06 21:07   ` [committed 3/3] libstdc++: Cleanup whitespace and type trait usage in <optional> Jonathan Wakely
2020-07-06 21:08   ` [committed 2/3] libstdc++: Constrain std::make_optional Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200706210646.GD4137376@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).