1 // (C) Copyright David Abrahams 2001. Permission to copy, use, modify,
2 // sell and distribute this software is granted provided this
3 // copyright notice appears in all copies. This software is provided
4 // "as is" without express or implied warranty, and with no claim as
5 // to its suitability for any purpose.
7 // See http://www.boost.org for most recent version including documentation.
10 // 09 Feb 01 Applied John Maddock's Borland patch Moving <true>
11 // specialization to unspecialized template (David Abrahams)
12 // 06 Feb 01 Created (David Abrahams)
14 #ifndef SELECT_TYPE_DWA20010206_HPP
15 # define SELECT_TYPE_DWA20010206_HPP
17 namespace boost { namespace detail {
19 // Template class if_true -- select among 2 types based on a bool constant expression
21 // typename if_true<(bool_const_expression)>::template then<true_type, false_type>::type
23 // HP aCC cannot deal with missing names for template value parameters
24 template <bool b> struct if_true
26 template <class T, class F>
27 struct then { typedef T type; };
33 template <class T, class F>
34 struct then { typedef F type; };
37 #endif // SELECT_TYPE_DWA20010206_HPP