http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53036

--- Comment #2 from Marc Glisse <marc.glisse at normalesup dot org> 2012-04-19 
12:14:04 UTC ---
Created attachment 27189
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27189
basic patch

The patch detects D as trivial.

Sadly, on this case:
struct A {
  A()=default;
  A(int=2);
};
it says A is trivial whereas I guess the ambiguity makes it non-trivial. That
could be solved for the traits by combining it with is_default_constructible,
but it may be problematic to let g++ internally believe that the class is
trivially default constructible. For some strange reason, in the case of an
ellipsis:
struct A {
  A()=default;
  A(...);
};
it does say: non-trivial.

Maybe the whole dance should only be done if the constructor argument is a
parameter pack (one that belongs to the function? or several packs?).

Reply via email to