public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/100470] New: std::is_nothrow_move_constructible incorrect behavior for explicitly defaulted members
@ 2021-05-07 11:16 oleksandr.koval.dev at gmail dot com
  2021-09-06 15:54 ` [Bug c++/100470] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: oleksandr.koval.dev at gmail dot com @ 2021-05-07 11:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100470
           Summary: std::is_nothrow_move_constructible incorrect behavior
                    for explicitly defaulted members
           Product: gcc
           Version: 11.1.0
               URL: https://godbolt.org/z/hqeh4E3M8
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: oleksandr.koval.dev at gmail dot com
  Target Milestone: ---

Explicit exception specification should be the actual one, hence, S2 should NOT
be nothrow-constructible.

#include <type_traits>

struct S1{
    S1(S1&&) noexcept(false);
};
struct S2{
    S2(S2&&) noexcept(false) = default;
};
struct S3{
    S3(S3&&) noexcept(false){}
};
struct S4{
    S4(S4&&) = default;
};

static_assert(!std::is_nothrow_move_constructible_v<S1>);  // OK
static_assert(!std::is_nothrow_move_constructible_v<S2>);  // failed
static_assert(!std::is_nothrow_move_constructible_v<S3>);  // OK
static_assert(std::is_nothrow_move_constructible_v<S4>);   // OK

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

end of thread, other threads:[~2023-12-11  2:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 11:16 [Bug libstdc++/100470] New: std::is_nothrow_move_constructible incorrect behavior for explicitly defaulted members oleksandr.koval.dev at gmail dot com
2021-09-06 15:54 ` [Bug c++/100470] " redi at gcc dot gnu.org
2022-09-20  9:23 ` redi at gcc dot gnu.org
2022-09-20  9:43 ` redi at gcc dot gnu.org
2022-09-20  9:50 ` redi at gcc dot gnu.org
2023-08-08 21:45 ` pinskia at gcc dot gnu.org
2023-10-26 16:07 ` johelegp at gmail dot com
2023-12-11  2:34 ` cvs-commit 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).