Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:48:03

0001 
0002 #ifndef BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED
0003 #define BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2001-2004
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. 
0008 // (See accompanying file LICENSE_1_0.txt or copy at 
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 // See http://www.boost.org/libs/mpl for documentation.
0012 
0013 // $Id$
0014 // $Date$
0015 // $Revision$
0016 
0017 #include <boost/mpl/arg_fwd.hpp>
0018 #include <boost/mpl/bool.hpp>
0019 #include <boost/mpl/aux_/yes_no.hpp>
0020 #include <boost/mpl/aux_/type_wrapper.hpp>
0021 #include <boost/mpl/aux_/nttp_decl.hpp>
0022 #include <boost/mpl/aux_/config/ctps.hpp>
0023 #include <boost/mpl/aux_/config/static_constant.hpp>
0024 
0025 namespace boost { namespace mpl {
0026 
0027 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0028 
0029 template< typename T >
0030 struct is_placeholder
0031     : bool_<false>
0032 {
0033 };
0034 
0035 template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
0036 struct is_placeholder< arg<N> >
0037     : bool_<true>
0038 {
0039 };
0040 
0041 #else
0042 
0043 namespace aux {
0044 
0045 aux::no_tag is_placeholder_helper(...);
0046 
0047 template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
0048 aux::yes_tag is_placeholder_helper(aux::type_wrapper< arg<N> >*);
0049 
0050 } // namespace aux
0051 
0052 template< typename T >
0053 struct is_placeholder
0054 {
0055     static aux::type_wrapper<T>* get();
0056     BOOST_STATIC_CONSTANT(bool, value = 
0057           sizeof(aux::is_placeholder_helper(get())) == sizeof(aux::yes_tag)
0058         );
0059     
0060     typedef bool_<value> type;
0061 };
0062 
0063 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
0064 
0065 }}
0066 
0067 #endif // BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED