GCC is claiming support for Standard Layout Types
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm) in its 4.4
series. However, the following example, taken directly from n2342, fails to
compile (with either --std=gnu++0x or --std=c++0x):

{{{
 #include <type_traits>

 struct B
 {
   int n;
   B() = default;
   B(int n_) : n(n_) {}
 };

 static_assert(std::is_pod<B>::value, "B is not POD!");

 int main() {}
}}}

I have checked with Beman Dawes, the author of n2342, and he confirms that the
code should compile under a conforming c++0x compiler.


-- 
           Summary: Support for C++0x standard layout and trivial types is
                    broken
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eric dot niebler at gmail dot com


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

Reply via email to