最終更新日時(UTC):
が更新

履歴 編集

function
<meta>

std::meta::is_mutable_member(C++26)

namespace std::meta {
  consteval bool is_mutable_member(info r);
}

概要

mutableメンバであるかを判定する。

戻り値

rmutable指定されたデータメンバを表す場合にtrueを返す。

#include <meta>

struct S {
  int x;
  mutable int y;
};

int main() {
  static_assert(!std::meta::is_mutable_member(^^S::x));
  static_assert(std::meta::is_mutable_member(^^S::y));
}

出力

バージョン

言語

  • C++26

処理系

参照