Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:34:42

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying 
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 #if !defined(FUSION_BACK_09162005_0350)
0008 #define FUSION_BACK_09162005_0350
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/sequence/intrinsic_fwd.hpp>
0012 #include <boost/fusion/sequence/intrinsic/end.hpp>
0013 #include <boost/fusion/iterator/prior.hpp>
0014 #include <boost/fusion/iterator/deref.hpp>
0015 #include <boost/mpl/bool.hpp>
0016 
0017 namespace boost { namespace fusion
0018 {
0019     struct fusion_sequence_tag;
0020 
0021     namespace result_of
0022     {
0023         template <typename Sequence>
0024         struct back
0025             : result_of::deref<typename result_of::prior<typename result_of::end<Sequence>::type>::type>
0026         {};
0027     }
0028     
0029     template <typename Sequence>
0030     BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0031     inline typename result_of::back<Sequence>::type
0032     back(Sequence& seq)
0033     {
0034         return *fusion::prior(fusion::end(seq));
0035     }
0036 
0037     template <typename Sequence>
0038     BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0039     inline typename result_of::back<Sequence const>::type
0040     back(Sequence const& seq)
0041     {
0042         return *fusion::prior(fusion::end(seq));
0043     }
0044 }}
0045 
0046 #endif