is_bind_expression, classe

Teste si type généré en appelant bind.

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

Notes

La valeur constante value indique si le type Ty est un type retourné par un appel à bind, sinon false.

Exemple

 

// std_tr1__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); 
    } 
 
  

Configuration requise

En-tête : <functional>

Espace de noms : std

Voir aussi

Référence

bind, fonction