blob: b0aea68835e1746ebf1041f4d9d6230cf75c0511 [file] [log] [blame]
Brian Silverman4a2409e2018-08-04 23:24:02 -07001[/
2 Copyright 2010 John Maddock.
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt).
6]
7
8[/===================================================================]
9[section:conditional conditional]
10[/===================================================================]
11
12
13__header ` #include <boost/type_traits/conditional.hpp>` or ` #include <boost/type_traits.hpp>`
14
15 namespace boost {
16 template <bool B, class T, class U> struct __conditional;
17 template <bool B, class T, class U> using conditional_t = typename conditional<B, T, U>::type; // C++11 and above
18 }
19
20If B is true, the member typedef type shall equal T. If B is false, the member typedef type shall equal U.
21
22[endsect]
23