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

履歴 編集

function
<meta>

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

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

概要

指定した2つの型の間でswap可能かを判定する。std::is_swappable_withに対応する。

戻り値

type_dsttype_srcが表す型の間でswap可能な場合にtrueを返す。

例外

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

#include <meta>

int main() {
  static_assert(std::meta::is_swappable_with_type(^^int&, ^^int&));
}

出力

バージョン

言語

  • C++26

処理系

参照