template <class T> struct is_bind_expression;
| member type | definition |
|---|---|
| value_type | bool |
| type | either true_type or false_type |
| member type | definition |
|---|---|
| value_type | bool |
| type | either true_type or false_type (or a type with the same characteristics) |
| member constant | definition |
|---|---|
| value | either true or false |
| member constant | definition |
|---|---|
| operator bool | Returns either true or false |
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;
}
true