Namespaces
Variants
Views
Actions

C++ concepts: StandardLayoutType

From cppreference.com
< cpp‎ | concept
Revision as of 22:50, 31 May 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Specifies that a type is standard layout type. Standard layout types are useful for communicating with code written in other programming languages.

Note, that the standard doesn't define a named requirement or concept with this name. This is a type category defined by the core language. It is included here as concept only for consistency.

[edit] Requirements

  • All non-static member have the same access control
  • Has no virtual functions or virtual base classes
  • All non-static members and base classes are themselves standard layout types
  • Has no base classes of the same type as the first non-static data member
  • Either has no non-static data members in the most derived class and at most one base class with non-static data members
  • Or has no base classes with non-static data members at all

[edit] See also

checks if a type is standard-layout type
(class template) [edit]