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

履歴 編集

function
<meta>

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

namespace std::meta {
  consteval bool reference_constructs_from_temporary(info type_dst, info type_src);
}

概要

参照が一時オブジェクトから構築されるかを判定する。std::reference_constructs_from_temporaryに対応する。

戻り値

type_dstの参照がtype_srcからの一時オブジェクトに束縛される場合にtrueを返す。

例外

type_dstまたはtype_srcが型を表さない場合、std::meta::exception例外を送出する。

#include <meta>
#include <string>

int main() {
  static_assert(std::meta::reference_constructs_from_temporary(
    ^^const std::string&, ^^const char*));
}

出力

バージョン

言語

  • C++26

処理系

関連項目

参照