Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:52

0001 /* Copyright 2006-2009 Joaquin M Lopez Munoz.
0002  * Distributed under the Boost Software License, Version 1.0.
0003  * (See accompanying file LICENSE_1_0.txt or copy at
0004  * http://www.boost.org/LICENSE_1_0.txt)
0005  *
0006  * See http://www.boost.org/libs/flyweight for library home page.
0007  */
0008 
0009 #ifndef BOOST_FLYWEIGHT_DETAIL_IS_PLACEHOLDER_EXPR_HPP
0010 #define BOOST_FLYWEIGHT_DETAIL_IS_PLACEHOLDER_EXPR_HPP
0011 
0012 #if defined(_MSC_VER)
0013 #pragma once
0014 #endif
0015 
0016 #include <boost/type_traits/is_same.hpp>
0017 #include <boost/mpl/apply.hpp>
0018 #include <boost/mpl/aux_/lambda_support.hpp>
0019 #include <boost/mpl/not.hpp>
0020 #include <boost/preprocessor/facilities/intercept.hpp>
0021 #include <boost/preprocessor/repetition/enum_params.hpp>
0022 
0023 namespace boost{
0024 
0025 namespace flyweights{
0026 
0027 namespace detail{
0028 
0029 /* is_placeholder_expression<T> indicates whether T is an
0030  * MPL placeholder expression.
0031  */
0032 
0033 template<typename T>
0034 struct is_placeholder_expression_helper
0035 {
0036   template<
0037     BOOST_PP_ENUM_PARAMS(
0038       BOOST_MPL_LIMIT_METAFUNCTION_ARITY,typename BOOST_PP_INTERCEPT)
0039   >
0040   struct apply{
0041     typedef int type;
0042   };
0043 
0044   BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_placeholder_expression_helper,(T))
0045 };
0046 
0047 template<typename T>
0048 struct is_placeholder_expression:
0049   mpl::not_<is_same<
0050     typename mpl::apply<
0051       is_placeholder_expression_helper<T>,
0052       BOOST_PP_ENUM_PARAMS(
0053         BOOST_MPL_LIMIT_METAFUNCTION_ARITY,int BOOST_PP_INTERCEPT)
0054     >::type,
0055     int
0056   > >
0057 {};
0058 
0059 } /* namespace flyweights::detail */
0060 
0061 } /* namespace flyweights */
0062 
0063 } /* namespace boost */
0064 
0065 #endif