A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/reference/functional/is_bind_expression/ below:

class template

<functional>

std::is_bind_expression
template <class T> struct is_bind_expression;

Is bind expression

Trait class that identifies whether T is a bind expression.

It is defined with the same characteristics as either

true_type

or

false_type

, depending on whether

T

is a type returned from

bind

or not.



The bind function uses this trait to determine whether the type of each of its arguments is a subexpression (i.e., whether it is itself a type returned by bind). Users can specialize this template for types that are to be treated as bind subexpressions.

Template parameters
T
A type.

Member types member type definition value_type bool type either true_type or false_type (or a type with the same characteristics)
Member constants member constant definition value either true or false
Member functions member constant definition operator bool Returns either true or false
Example
1
2
3
4
5
6
7
8
9
10
11
12
13
// is_bind_expression example
#include <iostream>     // std::cout, std::boolalpha
#include <functional>   // std::bind, std::plus, std::placeholders, std::is_bind_expression

int main () {
  using namespace std::placeholders;  // introduces _1
  auto increase_int = std::bind (std::plus<int>(),_1,1);

  std::cout << std::boolalpha;
  std::cout << std::is_bind_expression<decltype(increase_int)>::value << '\n';

  return 0;
}

Output:


See also
bind
Bind function arguments (function template)
is_placeholder
Is placeholder (class template)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4