mirror of
https://github.com/boostorg/type_traits.git
synced 2026-01-19 16:52:13 +00:00
24 lines
801 B
Plaintext
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]
|
|
|