Files
type_traits/doc/conditional.qbk
2017-05-16 21:52:06 +03:00

24 lines
801 B
Plaintext

[/
Copyright 2010 John Maddock.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[/===================================================================]
[section:conditional conditional]
[/===================================================================]
__header ` #include <boost/type_traits/conditional.hpp>` or ` #include <boost/type_traits.hpp>`
namespace boost {
template <bool B, class T, class U> struct __conditional;
template <bool B, class T, class U> using conditional_t = typename conditional<B, T, U>::type; // C++11 and above
}
If B is true, the member typedef type shall equal T. If B is false, the member typedef type shall equal U.
[endsect]