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

履歴 編集

function
<meta>

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

namespace std::meta {
  consteval bool is_member_function_pointer_type(info type);
}

概要

メンバ関数ポインタ型であるかを判定する。

戻り値

typeがメンバ関数ポインタ型を表す場合にtrueを返す。

例外

typeが型を表さない場合、std::meta::exception例外を送出する。

#include <meta>

struct S { void f() {} };

int main() {
  // メンバ関数ポインタ型のリフレクションで判定
  using MFP = void (S::*)();
  static_assert(std::meta::is_member_function_pointer_type(^^MFP));
}

出力

バージョン

言語

  • C++26

処理系

関連項目

参照