|
Sacado Package Browser (Single Doxygen Collection) Version of the Day
|
00001 // $Id$ 00002 // $Source$ 00003 // @HEADER 00004 // *********************************************************************** 00005 // 00006 // Sacado Package 00007 // Copyright (2006) Sandia Corporation 00008 // 00009 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00010 // the U.S. Government retains certain rights in this software. 00011 // 00012 // This library is free software; you can redistribute it and/or modify 00013 // it under the terms of the GNU Lesser General Public License as 00014 // published by the Free Software Foundation; either version 2.1 of the 00015 // License, or (at your option) any later version. 00016 // 00017 // This library is distributed in the hope that it will be useful, but 00018 // WITHOUT ANY WARRANTY; without even the implied warranty of 00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 // Lesser General Public License for more details. 00021 // 00022 // You should have received a copy of the GNU Lesser General Public 00023 // License along with this library; if not, write to the Free Software 00024 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00025 // USA 00026 // Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps 00027 // (etphipp@sandia.gov). 00028 // 00029 // *********************************************************************** 00030 // @HEADER 00031 00032 #ifndef SACADO_MPL_IS_PLACEHOLDER_HPP 00033 #define SACADO_MPL_IS_PLACEHOLDER_HPP 00034 00035 #include "Sacado_mpl_is_placeholder.hpp" 00036 #include "Sacado_mpl_none.hpp" 00037 00038 namespace Sacado { 00039 00040 namespace mpl { 00041 00042 template <class F> 00043 struct is_placeholder { 00044 static const bool value = false; 00045 }; 00046 template <int N> 00047 struct is_placeholder< arg<N> > { 00048 static const bool value = true; 00049 }; 00050 template <template <class T1> class F, 00051 class T1> 00052 struct is_placeholder< F<T1> > { 00053 static const bool value = is_placeholder<T1>::value; 00054 }; 00055 template <template <class T1, class T2> class F, 00056 class T1, 00057 class T2> 00058 struct is_placeholder< F<T1,T2> > { 00059 static const bool value = 00060 is_placeholder<T1>::value || 00061 is_placeholder<T2>::value; 00062 }; 00063 template <template <class T1, class T2, class T3> class F, 00064 class T1, 00065 class T2, 00066 class T3> 00067 struct is_placeholder< F<T1,T2,T3> > { 00068 static const bool value = 00069 is_placeholder<T1>::value || 00070 is_placeholder<T2>::value || 00071 is_placeholder<T3>::value; 00072 }; 00073 template <template <class T1, class T2, class T3, class T4> class F, 00074 class T1, 00075 class T2, 00076 class T3, 00077 class T4> 00078 struct is_placeholder< F<T1,T2,T3,T4> > { 00079 static const bool value = 00080 is_placeholder<T1>::value || 00081 is_placeholder<T2>::value || 00082 is_placeholder<T3>::value || 00083 is_placeholder<T4>::value; 00084 }; 00085 template <template <class T1, class T2, class T3, class T4, class T5> class F, 00086 class T1, 00087 class T2, 00088 class T3, 00089 class T4, 00090 class T5> 00091 struct is_placeholder< F<T1,T2,T3,T4,T5> > { 00092 static const bool value = 00093 is_placeholder<T1>::value || 00094 is_placeholder<T2>::value || 00095 is_placeholder<T3>::value || 00096 is_placeholder<T4>::value || 00097 is_placeholder<T5>::value; 00098 }; 00099 00100 } // namespace mpl 00101 00102 } // namespace Sacado 00103 00104 #endif // SACADO_MPL_IS_PLACEHOLDER_HPP
1.7.4