Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      C++ named requirements:StandardLayoutType(since C++11)

      From cppreference.com
      <cpp‎ |named req
       
       
      C++ named requirements
       

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

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

      Contents

      [edit]Requirements

      The following types are collectively calledstandard-layout types:

      [edit]Properties

      SeeStandard-layout.

      [edit]Defect reports

      The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

      DRApplied toBehavior as publishedCorrect behavior
      CWG 1672C++11first non-static data member rule ignored
      existence of empty base classes
      first non-static data member rule
      made recursive
      CWG 1813C++11class with a member defined in an indirect base
      wasn't technically standard-layout
      all member declarations must be
      in the same class
      CWG 2120C++11array as first member wasn't considered when
      comparing the first element type with type of a base
      array members are considered

      [edit]See also

      checks if a type is astandard-layout type
      (class template)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/named_req/StandardLayoutType&oldid=168783"

      [8]ページ先頭

      ©2009-2025 Movatter.jp