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

履歴 編集

function
<meta>

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

namespace std::meta {
  consteval string_view display_string_of(info r);
  consteval u8string_view u8display_string_of(info r);
}

概要

リフレクションの表示用文字列を取得する。

戻り値

rの人間可読な表示文字列を返す。結果は実装定義である。

#include <meta>
#include <print>

int main() {
  std::println("{}", std::meta::display_string_of(^^int));
  std::println("{}", std::meta::display_string_of(^^std::vector));
}

出力例

int
template<class _Tp, class _Alloc> class std::vector

バージョン

言語

  • C++26

処理系

参照