<type_traits> typedefs
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at <type_traits> typedefs.
false_type Typedef](#false_type_typedef)|true_type Typedef|
Holds integral constant with false value.
typedef integral_constant<bool, false> false_type;
Remarks
The type is a synonym for a specialization of the template integral_constant.
Example
#include <type_traits>
#include <iostream>
int main()
{
std::cout << "false_type == " << std::boolalpha
<< std::false_type::value << std::endl;
std::cout << "true_type == " << std::boolalpha
<< std::true_type::value << std::endl;
return (0);
}
false_type == false true_type == true
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::false_type::value << std::endl;
std::cout << "true_type == " << std::boolalpha
<< std::true_type::value << std::endl;
return (0);
}
false_type == false true_type == true
Show: