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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-12-11
          Component|libstdc++                   |c++
            Summary|Bad std::is_standard_layout |[DR1813] Bad
                   |with two base class         |std::is_standard_layout
                   |subobjects of the same type |with two base class
                   |                            |subobjects of the same type
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
G++ doesn't implement DR 1813 yet, https://wg21.link/cwg1813

struct B { int i; };        // standard-layout class
struct C : B { };           // standard-layout class
struct D : C { };           // standard-layout class
struct E : D { char : 4; }; // not a standard-layout class
static_assert( __is_standard_layout(B), "" );
static_assert( __is_standard_layout(C), "" );
static_assert( __is_standard_layout(D), "" );
static_assert( ! __is_standard_layout(E), "" );
struct Q {};
struct S : Q { };
struct T : Q { };
struct U : S, T { };         // not a standard-layout class
static_assert( ! __is_standard_layout(U), "" );
int main() { }

G++ fails the last assertion (and Clang fails the last two).

Reply via email to