end_impl.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*=============================================================================
  2. Copyright (c) 2013 Mateusz Loskot
  3. Copyright (c) 2001-2011 Joel de Guzman
  4. Copyright (c) 2005-2006 Dan Marsden
  5. Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. ==============================================================================*/
  8. #if !defined(BOOST_FUSION_STD_ARRAY_END_OF_IMPL_01062013_1700)
  9. #define BOOST_FUSION_STD_ARRAY_END_OF_IMPL_01062013_1700
  10. #include <boost/fusion/adapted/std_array/std_array_iterator.hpp>
  11. #include <boost/fusion/adapted/std_array/detail/array_size.hpp>
  12. #include <boost/type_traits/remove_const.hpp>
  13. namespace boost { namespace fusion {
  14. struct std_array_tag;
  15. namespace extension
  16. {
  17. template <typename Tag>
  18. struct end_impl;
  19. template <>
  20. struct end_impl<std_array_tag>
  21. {
  22. template <typename Sequence>
  23. struct apply
  24. {
  25. typedef typename remove_const<Sequence>::type seq_type;
  26. static int const size = std_array_size<seq_type>::value;
  27. typedef std_array_iterator<Sequence, size> type;
  28. static type
  29. call(Sequence& v)
  30. {
  31. return type(v);
  32. }
  33. };
  34. };
  35. }
  36. }}
  37. #endif