public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41421]  New: [C++0x] Trivial types should require trivial default constructor.
@ 2009-09-20 18:32 cadaker at gmail dot com
  2009-09-20 19:11 ` [Bug c++/41421] " paolo dot carlini at oracle dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: cadaker at gmail dot com @ 2009-09-20 18:32 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-21 16:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-20 18:32 [Bug c++/41421] New: [C++0x] Trivial types should require trivial default constructor cadaker at gmail dot com
2009-09-20 19:11 ` [Bug c++/41421] " paolo dot carlini at oracle dot com
2009-09-21 16:11 ` jason at gcc dot gnu dot org
2009-09-21 16:30 ` jason at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).