Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.57 KB

File metadata and controls

52 lines (40 loc) · 1.57 KB

data_member_options

  • meta[meta header]
  • std::meta[meta namespace]
  • class[meta id-type]
  • cpp26[meta cpp]
namespace std::meta {
  struct data_member_options {
    struct name-type;       // 説明専用
    std::optional<name-type> name;
    std::optional<int> alignment;
    std::optional<int> bit_width;
    bool no_unique_address = false;
    std::vector<info> annotations;
  };
}

概要

data_member_optionsは、data_member_spec()でデータメンバの仕様を作成する際に、メンバの名前やアライメント、ビット幅などのオプションを指定するためのクラスである。

consteval-only型であり、実行時には存在できない。

メンバ変数

名前 説明
name メンバの名前。string_viewまたはu8string_viewを受け取る
alignment アライメントの指定
bit_width ビットフィールドのビット幅
no_unique_address [[no_unique_address]]属性を付加するか
annotations メンバに付加するアノテーションのリフレクションのリスト

バージョン

言語

  • C++26

処理系

関連項目

参照