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

履歴 編集

function
<meta>

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

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

概要

テンプレートの特殊化からテンプレート自体のリフレクションを取得する。

戻り値

rがテンプレートの特殊化を表す場合、そのテンプレートのリフレクションを返す。has_template_arguments(r)trueであることが事前条件となる。

例外

has_template_arguments(r)falseの場合、std::meta::exception例外を送出する。

#include <meta>
#include <vector>

int main() {
  static_assert(std::meta::template_of(^^std::vector<int>) == ^^std::vector);
}

出力

バージョン

言語

  • C++26

処理系

関連項目

参照