Back to home page

EIC code displayed by LXR

 
 

    


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

0001 
0002 #ifndef BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED
0003 #define BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2000-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/back_fwd.hpp>
0018 #include <boost/mpl/next_prior.hpp>
0019 #include <boost/mpl/vector/aux_/at.hpp>
0020 #include <boost/mpl/vector/aux_/tag.hpp>
0021 #include <boost/mpl/aux_/config/typeof.hpp>
0022 #include <boost/mpl/aux_/config/ctps.hpp>
0023 
0024 namespace boost { namespace mpl {
0025 
0026 #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
0027 
0028 template<>
0029 struct back_impl< aux::vector_tag >
0030 {
0031     template< typename Vector > struct apply
0032         : v_at<
0033               Vector
0034             , prior<typename Vector::size>::type::value
0035             >
0036     {
0037     };
0038 };
0039 
0040 #else
0041 
0042 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0043 
0044 template< long n_ >
0045 struct back_impl< aux::vector_tag<n_> >
0046 {
0047     template< typename Vector > struct apply
0048     {
0049         typedef typename Vector::back type;
0050     };
0051 };
0052 
0053 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
0054 
0055 #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
0056 
0057 }}
0058 
0059 #endif // BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED