src/sysc/packages/boost/detail/select_type.hpp

Go to the documentation of this file.
00001 // (C) Copyright David Abrahams 2001. Permission to copy, use, modify,
00002 // sell and distribute this software is granted provided this
00003 // copyright notice appears in all copies. This software is provided
00004 // "as is" without express or implied warranty, and with no claim as
00005 // to its suitability for any purpose.
00006 //
00007 // See http://www.boost.org for most recent version including documentation.
00008 
00009 // Revision History
00010 // 09 Feb 01  Applied John Maddock's Borland patch Moving <true>
00011 //            specialization to unspecialized template (David Abrahams)
00012 // 06 Feb 01  Created (David Abrahams)
00013 
00014 #ifndef SELECT_TYPE_DWA20010206_HPP
00015 # define SELECT_TYPE_DWA20010206_HPP
00016 
00017 namespace boost { namespace detail {
00018 
00019   // Template class if_true -- select among 2 types based on a bool constant expression
00020   // Usage:
00021   //   typename if_true<(bool_const_expression)>::template then<true_type, false_type>::type
00022 
00023   // HP aCC cannot deal with missing names for template value parameters
00024   template <bool b> struct if_true
00025   {
00026       template <class T, class F>
00027       struct then { typedef T type; };
00028   };
00029 
00030   template <>
00031   struct if_true<false>
00032   {
00033       template <class T, class F>
00034       struct then { typedef F type; };
00035   };
00036 }}
00037 #endif // SELECT_TYPE_DWA20010206_HPP

Generated on Wed Apr 25 13:53:28 2007 for SystemC by  doxygen 1.5.1