Share via


true_type Typedef

Holds integral constant with true value.

typedef integral_constant<bool, true> true_type;

Remarks

The type is a synonym for a specialization of the template integral_constant.

Example

 

// std_tr1__type_traits__true_type.cpp 
// compile with: /EHsc 
#include <type_traits> 
#include <iostream> 
 
int main() 
    { 
    std::cout << "false_type == " << std::boolalpha 
        << std::tr1::false_type::value << std::endl; 
    std::cout << "true_type == " << std::boolalpha 
        << std::tr1::true_type::value << std::endl; 
 
    return (0); 
    } 
 

false_type == false true_type == true

Requirements

Header: <type_traits>

Namespace: std::tr1

See Also

Reference

<type_traits>

false_type Typedef