epoc32/include/stdapis/boost/mpl/aux_/at_impl.hpp
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/stdapis/boost/mpl/aux_/at_impl.hpp	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/stdapis/boost/mpl/aux_/at_impl.hpp	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,8 +1,8 @@
     1.4  
     1.5 -#ifndef BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED
     1.6 -#define BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED
     1.7 +#ifndef BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED
     1.8 +#define BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED
     1.9  
    1.10 -// Copyright Aleksey Gurtovoy 2003-2004
    1.11 +// Copyright Aleksey Gurtovoy 2000-2004
    1.12  //
    1.13  // Distributed under the Boost Software License, Version 1.0. 
    1.14  // (See accompanying file LICENSE_1_0.txt or copy at 
    1.15 @@ -10,31 +10,36 @@
    1.16  //
    1.17  // See http://www.boost.org/libs/mpl for documentation.
    1.18  
    1.19 -// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/at_impl.hpp,v $
    1.20 -// $Date: 2004/09/02 15:41:02 $
    1.21 -// $Revision: 1.2 $
    1.22 +// $Source: /cvsroot/boost/boost/boost/mpl/aux_/at_impl.hpp,v $
    1.23 +// $Date: 2004/09/02 15:40:43 $
    1.24 +// $Revision: 1.5 $
    1.25  
    1.26 -#include <boost/mpl/at_fwd.hpp>
    1.27 -#include <boost/mpl/set/aux_/has_key_impl.hpp>
    1.28 -#include <boost/mpl/set/aux_/tag.hpp>
    1.29 -#include <boost/mpl/if.hpp>
    1.30 -#include <boost/mpl/void.hpp>
    1.31 +#include <boost/mpl/begin_end.hpp>
    1.32 +#include <boost/mpl/advance.hpp>
    1.33 +#include <boost/mpl/deref.hpp>
    1.34 +#include <boost/mpl/aux_/traits_lambda_spec.hpp>
    1.35  
    1.36  namespace boost { namespace mpl {
    1.37  
    1.38 -template<>
    1.39 -struct at_impl< aux::set_tag >
    1.40 +// default implementation; conrete sequences might override it by 
    1.41 +// specializing either the 'at_impl' or the primary 'at' template
    1.42 +
    1.43 +template< typename Tag >
    1.44 +struct at_impl
    1.45  {
    1.46 -    template< typename Set, typename T > struct apply
    1.47 +    template< typename Sequence, typename N > struct apply
    1.48      {
    1.49 -        typedef typename if_< 
    1.50 -              has_key_impl<aux::set_tag>::apply<Set,T>
    1.51 -            , T
    1.52 -            , void_
    1.53 -            >::type type;            
    1.54 +        typedef typename advance<
    1.55 +              typename begin<Sequence>::type
    1.56 +            , N
    1.57 +            >::type iter_;
    1.58 +
    1.59 +        typedef typename deref<iter_>::type type;
    1.60      };
    1.61  };
    1.62  
    1.63 +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, at_impl)
    1.64 +
    1.65  }}
    1.66  
    1.67 -#endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED
    1.68 +#endif // BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED