begin_end_impl.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED
  2. #define BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED
  3. // Copyright Aleksey Gurtovoy 2003-2004
  4. // Copyright David Abrahams 2003-2004
  5. //
  6. // Distributed under the Boost Software License, Version 1.0.
  7. // (See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // See http://www.boost.org/libs/mpl for documentation.
  11. // $Id$
  12. // $Date$
  13. // $Revision$
  14. #include <boost/mpl/begin_end_fwd.hpp>
  15. #include <boost/mpl/next_prior.hpp>
  16. #include <boost/mpl/map/aux_/iterator.hpp>
  17. namespace boost { namespace mpl {
  18. template<>
  19. struct begin_impl< aux::map_tag >
  20. {
  21. template< typename Map > struct apply
  22. {
  23. typedef typename next< typename Map::order >::type max_order_;
  24. typedef m_iter<
  25. Map
  26. , next_order<Map,1,max_order_::value>::value
  27. , max_order_::value
  28. > type;
  29. };
  30. };
  31. template<>
  32. struct end_impl< aux::map_tag >
  33. {
  34. template< typename Map > struct apply
  35. {
  36. typedef typename next< typename Map::order >::type max_order_;
  37. typedef m_iter< Map,max_order_::value,max_order_::value > type;
  38. };
  39. };
  40. }}
  41. #endif // BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED