Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:07:41

0001 // Copyright David Abrahams 2002.
0002 // Distributed under the Boost Software License, Version 1.0. (See
0003 // accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
0005 #ifndef IF_ELSE_DWA2002322_HPP
0006 # define IF_ELSE_DWA2002322_HPP
0007 # include <boost/config.hpp>
0008 
0009 namespace boost { namespace python { namespace detail { 
0010 
0011 template <class T> struct elif_selected;
0012 
0013 template <class T>
0014 struct if_selected
0015 {
0016     template <bool b>
0017     struct elif : elif_selected<T>
0018     {
0019     };
0020 
0021     template <class U>
0022     struct else_
0023     {
0024         typedef T type;
0025     };
0026 };
0027 
0028 template <class T>
0029 struct elif_selected
0030 {
0031 # if !(defined(__MWERKS__) && __MWERKS__ <= 0x2407)
0032     template <class U> class then;
0033 # else
0034     template <class U>
0035     struct then : if_selected<T>
0036     {
0037     };
0038 # endif 
0039 };
0040 
0041 # if !(defined(__MWERKS__) && __MWERKS__ <= 0x2407)
0042 template <class T>
0043 template <class U>
0044 class elif_selected<T>::then : public if_selected<T>
0045 {
0046 };
0047 # endif 
0048 
0049 template <bool b> struct if_
0050 {
0051     template <class T>
0052     struct then : if_selected<T>
0053     {
0054     };
0055 };
0056 
0057 struct if_unselected
0058 {
0059     template <bool b> struct elif : if_<b>
0060     {
0061     };
0062 
0063     template <class U>
0064     struct else_
0065     {
0066         typedef U type;
0067     };
0068 };
0069 
0070 template <>
0071 struct if_<false>
0072 {
0073     template <class T>
0074     struct then : if_unselected
0075     {
0076     };
0077 };
0078 
0079 }}} // namespace boost::python::detail
0080 
0081 #endif // IF_ELSE_DWA2002322_HPP