Share via


is_bind_expression (Clase)

Comprueba si el tipo se genera mediante una llamada a bind.

Sintaxis

template<class Ty>
struct is_bind_expression {
   static const bool value;
};

Comentarios

El miembro constante value es true si el tipo Ty es un tipo devuelto mediante una llamada a bind. En caso contrario, es false.

Ejemplo

// std__functional__is_bind_expression.cpp
// compile with: /EHsc
#include <functional>
#include <iostream>

void square(double x)
{
    std::cout << x << "^2 == " << x * x << std::endl;
}

template<class Expr>
void test_for_bind(const Expr&)
{
    std::cout << std::is_bind_expression<Expr>::value << std::endl;
}

int main()
{
    test_for_bind(3.0 * 3.0);
    test_for_bind(std::bind(square, 3));

    return (0);
}
0
1