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

--- Comment #24 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
(In reply to Jason Merrill from comment #23)
> (In reply to Ville Voutilainen from comment #22)
> > This test fails the static_assert for TType (which is a trivial type),
> > PODType and DelDef, and it would be expected that all those static_asserts
> > succeed.
> No:
> struct A { };
> int main()
> {
>   volatile A a;
>   volatile A a2(a); // ill-formed
> }
> test_category is testing whether volatile TType is trivially
> copy-constructible, and it isn't copy-constructible at all.

Argh, thanks, I'll need to make those tests saner.

> Incidentally, you don't need to test anything else before
> __is_trivially_constructible, it will just return false if the type isn't
> constructible at all.  Likewise for assignable.

These library traits require that for a true-answer, the type used
must be referenceable. The 'main' traits do that, I wasn't sure whether
the intrinsic does. The 'main' traits also limit the accepted types
as per the standard, so I'm inclined to leave the general testing
approach as is. Jonathan took a quick look at it and thought it looks
ok. ;)

> Looking at the ICE.

Excellent.

Reply via email to