The C++0x standard draft defines a trivial type as one that has trivial default construct, copy constructor, copy assignment operator and destructor. g++ from the current trunk, however, classifies types without default constructor as trivial, meaning that the following code does not compile:
#include <type_traits> struct Foo { Foo(int) {} }; static_assert(!std::is_trivial<Foo>::value, "Not trivial - no (trivial) default constructor."); This seems like a bug (unless I've misunderstood the draft or missed some pending change to it). -- Summary: [C++0x] Trivial types should require trivial default constructor. Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: cadaker at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41421