template <class T> struct is_placeholder; |
成员类型 | 定义 |
value_type | int |
type | 它继承的integral_constant类型。 |
成员类型 | 定义 |
value_type | int |
type | 它继承的integral_constant类型,或具有相同特征的类型 |
成员常量 | 定义 |
value | 如果T是占位符的类型:占位符的序号(_1为1,_2为2,…) 否则:0。 |
成员函数 | 定义 |
operator int | 返回成员常量值 |
// is_placeholder example #include <iostream> // std::cout, std::boolalpha #include <functional> // std::is_placeholder, std::placeholders int main () { using namespace std::placeholders; // introduces _1 std::cout << std::is_placeholder<decltype(_1)>::value << '\n'; std::cout << std::is_placeholder<decltype(_2)>::value << '\n'; std::cout << std::is_placeholder<int>::value << '\n'; return 0; } |
placeholders | 绑定参数占位符(命名空间) |
is_bind_expression | 是否绑定表达式(类模板) |