public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104242] New: Class with constructor from std::any is not copyable
@ 2022-01-26 12:51 fchelnokov at gmail dot com
  2022-01-26 12:52 ` [Bug c++/104242] " fchelnokov at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: fchelnokov at gmail dot com @ 2022-01-26 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104242
           Summary: Class with constructor from std::any is not copyable
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

The following code
```
#include <any>
#include <type_traits>

struct A {
    A(const A&) = default;
    explicit A(std::any value);
};
static_assert(std::is_copy_constructible_v<A>);
```
is accepted by GCC 11, but rejected by GCC trunk. Demo:
https://gcc.godbolt.org/z/sWTbhqE6c

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

end of thread, other threads:[~2023-06-23 12:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-26 12:51 [Bug c++/104242] New: Class with constructor from std::any is not copyable fchelnokov at gmail dot com
2022-01-26 12:52 ` [Bug c++/104242] " fchelnokov at gmail dot com
2022-01-26 13:06 ` [Bug c++/104242] [12 Regression] " rguenth at gcc dot gnu.org
2022-01-26 19:03 ` [Bug libstdc++/104242] " pinskia at gcc dot gnu.org
2022-01-26 19:05 ` pinskia at gcc dot gnu.org
2022-03-09 13:21 ` rguenth at gcc dot gnu.org
2022-03-18 15:42 ` cvs-commit at gcc dot gnu.org
2022-03-18 17:48 ` redi at gcc dot gnu.org
2023-06-23 12:56 ` 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).