https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63924
--- Comment #5 from Nikos <mouchtaris at gmail dot com> ---
I am sorry, it is missing from the original test case, but

  noop<
    require_costexpr< size0(ar) >,
    require_constexp< size1(ar) >
  >();

compiles fine. If the issue about test's trivial byte-wise copy construction is
true, shouldn't it cause the degenaration of size0's and size1's constexpr-ness
and cause errors in their usage as template arguments?

Standard-addressing issues are mentioned in the stackoverflow link I have
provided. Specifically, the following comes from ยง12.8 [class.copy]/p13:

  If the implicitly-defined constructor would satisfy the requirements of a
  constexpr constructor (7.1.5), the implicitly-defined constructor is
constexpr.

I don't see why an implicit constructor copying a literal padding byte is not a
constexpr constructor. The compiler, I assume, is capable of keeping track of
padding bytes as literals at compile time. Or am I mistaken?

Thanks a lot for the fix, and thanks a lot for such a quick response.

Reply via email to