Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:37

0001 
0002 #ifndef BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED
0004 
0005 // Copyright Eric Friedman 2002
0006 // Copyright Aleksey Gurtovoy 2004
0007 //
0008 // Distributed under the Boost Software License, Version 1.0. 
0009 // (See accompanying file LICENSE_1_0.txt or copy at 
0010 // http://www.boost.org/LICENSE_1_0.txt)
0011 //
0012 // See http://www.boost.org/libs/mpl for documentation.
0013 
0014 // $Id$
0015 // $Date$
0016 // $Revision$
0017 
0018 #include <boost/mpl/contains_fwd.hpp>
0019 #include <boost/mpl/begin_end.hpp>
0020 #include <boost/mpl/find.hpp>
0021 #include <boost/mpl/not.hpp>
0022 #include <boost/mpl/aux_/traits_lambda_spec.hpp>
0023 #include <boost/mpl/aux_/config/forwarding.hpp>
0024 #include <boost/mpl/aux_/config/static_constant.hpp>
0025 
0026 #include <boost/type_traits/is_same.hpp>
0027 
0028 namespace boost { namespace mpl {
0029 
0030 template< typename Tag >
0031 struct contains_impl
0032 {
0033     template< typename Sequence, typename T > struct apply
0034 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
0035         : not_< is_same<
0036               typename find<Sequence,T>::type
0037             , typename end<Sequence>::type
0038             > >
0039     {
0040 #else
0041     {
0042         typedef not_< is_same<
0043               typename find<Sequence,T>::type
0044             , typename end<Sequence>::type
0045             > > type;
0046 
0047         BOOST_STATIC_CONSTANT(bool, value = 
0048               (not_< is_same<
0049                   typename find<Sequence,T>::type
0050                 , typename end<Sequence>::type
0051                 > >::value)
0052             );
0053 #endif
0054     };
0055 };
0056 
0057 BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,contains_impl)
0058 
0059 }}
0060 
0061 #endif // BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED