From c81b86912726f09c6d7f491b12aadf8a9c13f124 Mon Sep 17 00:00:00 2001 From: nobody Date: Sun, 4 Mar 2001 16:05:22 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'unlabeled-1.3.2'. [SVN r9423] --- include/boost/detail/select_type.hpp | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 include/boost/detail/select_type.hpp diff --git a/include/boost/detail/select_type.hpp b/include/boost/detail/select_type.hpp new file mode 100644 index 0000000..2a95a98 --- /dev/null +++ b/include/boost/detail/select_type.hpp @@ -0,0 +1,35 @@ +// (C) Copyright David Abrahams 2001. Permission to copy, use, modify, +// sell and distribute this software is granted provided this +// copyright notice appears in all copies. This software is provided +// "as is" without express or implied warranty, and with no claim as +// to its suitability for any purpose. +// +// See http://www.boost.org for most recent version including documentation. + +// Revision History +// 09 Feb 01 Applied John Maddock's Borland patch Moving +// specialization to unspecialized template (David Abrahams) +// 06 Feb 01 Created (David Abrahams) + +#ifndef SELECT_TYPE_DWA20010206_HPP +# define SELECT_TYPE_DWA20010206_HPP + +namespace boost { namespace detail { + + // Template class if_true -- select among 2 types based on a bool constant expression + // Usage: + // typename if_true<(bool_const_expression)>::template then::type + template struct if_true + { + template + struct then { typedef T type; }; + }; + + template <> + struct if_true + { + template + struct then { typedef F type; }; + }; +}} +#endif // SELECT_TYPE_DWA20010206_HPP