public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95153] New: Arrays of 'const void *' should not be copyable
@ 2020-05-15 13:37 alisdairm at me dot com
  2020-05-15 14:02 ` [Bug c++/95153] " alisdairm at me dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: alisdairm at me dot com @ 2020-05-15 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95153
           Summary: Arrays of 'const void *' should not be copyable
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alisdairm at me dot com
  Target Milestone: ---

In general, we do not expect array types to be copyable according to the
'is_copy_constructible_v' trait.  However, the following started passing in gcc
10:

#include <type_traits>
static_assert(!std::is_copy_constructible_v<const void *[13]>);

Note that the 'const' is important, arrays of 'void *' remain non-copyable
according to the trait.

'void' may be a specific trigger too, as arrays of 'const int *' do not have
this problem.

Finally, the array bound does not seem significant, other than it gives the
expected answer again for an array of unknown bound.

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

end of thread, other threads:[~2022-03-11 18:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 13:37 [Bug c++/95153] New: Arrays of 'const void *' should not be copyable alisdairm at me dot com
2020-05-15 14:02 ` [Bug c++/95153] " alisdairm at me dot com
2020-05-15 16:39 ` [Bug c++/95153] Arrays of 'const void *' should not be copyable in C++20 rs2740 at gmail dot com
2020-07-06 12:28 ` alisdairm at me dot com
2020-07-06 12:52 ` redi at gcc dot gnu.org
2022-03-11 18:29 ` barry.revzin at gmail dot com

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