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

履歴 編集

class template
<functional>

std::is_bind_expression(C++11)

namespace std {
  template <class T>
  struct is_bind_expression;

  template <class T>
  inline constexpr bool is_bind_expression_v = is_bind_expression<T>::value; // C++17
}

概要

Tbind() の呼出し結果かどうかを判別する

要件

is_bind_expressionは、型 Tstd::bind() の戻り値であれば true_type から派生し、そうでなければ false_type から派生する。

#include <functional>

static_assert(
  std::is_bind_expression<
    decltype(std::bind(std::less<int>(), std::placeholders::_1, 3))
  >::value,
  "a bind expression");

static_assert(
  !std::is_bind_expression<decltype(std::less<int>()(2, 3))>::value,
  "not a bind expression");

int main() {}

出力

バージョン

言語

  • C++11

処理系

参照