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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-11-19
                 CC|                            |jason at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
> constexpr auto size3 (test t) { return require_constexpr< size0(t) >::value; }

The problem here is that 't' is non-constant within size3 and the implicit
trivial copy constructor does a bitwise copy, which involves copying a
(non-constant) byte of padding, whereas your user-provided copy constructor
doesn't copy anything.  This seems like a grey area in the standard, but I'll
go ahead and make it work for now.

Reply via email to