end_impl.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Copyright (c) 2005-2006 Dan Marsden
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #if !defined(BOOST_FUSION_END_IMPL_20060222_2042)
  8. #define BOOST_FUSION_END_IMPL_20060222_2042
  9. #include "../example_struct_iterator.hpp"
  10. namespace example
  11. {
  12. struct example_sequence_tag;
  13. }
  14. namespace boost { namespace fusion {
  15. namespace extension
  16. {
  17. template<typename Tag>
  18. struct end_impl;
  19. template<>
  20. struct end_impl<example::example_sequence_tag>
  21. {
  22. template<typename Sequence>
  23. struct apply
  24. {
  25. typedef example::example_struct_iterator<Sequence, 2> type;
  26. static type
  27. call(Sequence& seq)
  28. {
  29. return type(seq);
  30. }
  31. };
  32. };
  33. }
  34. }}
  35. #endif