public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/96036] New: Please make std::optinal noexcept constructible when possible
@ 2020-07-02 19:04 rafael at espindo dot la
  2020-07-02 19:45 ` [Bug libstdc++/96036] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rafael at espindo dot la @ 2020-07-02 19:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96036

            Bug ID: 96036
           Summary: Please make std::optinal noexcept constructible when
                    possible
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rafael at espindo dot la
  Target Milestone: ---

Only the move constructor of std::optional is conditionally noexcept.

The standard in res.on.exception.handling says:

An implementation may strengthen the exception specification for a non-virtual
function by adding a non-throwing exception specification.

So it should be possible to also make

template < class U = value_type >
constexpr optional( U&& value );

conditionally noexcept.

libstdc++ already does that for std::tuple.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/96036] Please make std::optinal noexcept constructible when possible
  2020-07-02 19:04 [Bug libstdc++/96036] New: Please make std::optinal noexcept constructible when possible rafael at espindo dot la
@ 2020-07-02 19:45 ` redi at gcc dot gnu.org
  2020-07-06 21:05 ` cvs-commit at gcc dot gnu.org
  2020-07-06 21:08 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2020-07-02 19:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96036

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2020-07-02
     Ever confirmed|0                           |1
   Target Milestone|---                         |11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/96036] Please make std::optinal noexcept constructible when possible
  2020-07-02 19:04 [Bug libstdc++/96036] New: Please make std::optinal noexcept constructible when possible rafael at espindo dot la
  2020-07-02 19:45 ` [Bug libstdc++/96036] " redi at gcc dot gnu.org
@ 2020-07-06 21:05 ` cvs-commit at gcc dot gnu.org
  2020-07-06 21:08 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-06 21:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96036

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:8992cd1892df1adb352cf5d5b279a00686d1e88a

commit r11-1857-g8992cd1892df1adb352cf5d5b279a00686d1e88a
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Jul 6 21:54:12 2020 +0100

    libstdc++: Add noexcept to std::optional initialization (PR 96036)

    libstdc++-v3/ChangeLog:

            PR libstdc++/96036
            * include/std/optional (optional): Add noexcept-specifier to
            every constructor, assignment operator, emplace function and
            dereference operator.
            * testsuite/20_util/optional/assignment/noexcept.cc: New test.
            * testsuite/20_util/optional/cons/noexcept.cc: New test.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/96036] Please make std::optinal noexcept constructible when possible
  2020-07-02 19:04 [Bug libstdc++/96036] New: Please make std::optinal noexcept constructible when possible rafael at espindo dot la
  2020-07-02 19:45 ` [Bug libstdc++/96036] " redi at gcc dot gnu.org
  2020-07-06 21:05 ` cvs-commit at gcc dot gnu.org
@ 2020-07-06 21:08 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2020-07-06 21:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96036

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed on trunk

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-06 21:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02 19:04 [Bug libstdc++/96036] New: Please make std::optinal noexcept constructible when possible rafael at espindo dot la
2020-07-02 19:45 ` [Bug libstdc++/96036] " redi at gcc dot gnu.org
2020-07-06 21:05 ` cvs-commit at gcc dot gnu.org
2020-07-06 21:08 ` redi at gcc dot gnu.org

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).