begin_impl.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #if !defined(BOOST_FUSION_BEGIN_IMPL_09272006_0719)
  7. #define BOOST_FUSION_BEGIN_IMPL_09272006_0719
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp>
  10. namespace boost { namespace fusion
  11. {
  12. struct boost_tuple_tag;
  13. namespace extension
  14. {
  15. template<typename T>
  16. struct begin_impl;
  17. template <>
  18. struct begin_impl<boost_tuple_tag>
  19. {
  20. template <typename Sequence>
  21. struct apply
  22. {
  23. typedef boost_tuple_iterator<Sequence> type;
  24. BOOST_FUSION_GPU_ENABLED
  25. static type
  26. call(Sequence& v)
  27. {
  28. return type(v);
  29. }
  30. };
  31. };
  32. }
  33. }}
  34. #endif