iterator_base.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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(FUSION_ITERATOR_BASE_05042005_1008)
  7. #define FUSION_ITERATOR_BASE_05042005_1008
  8. #include <boost/config.hpp>
  9. #include <boost/fusion/support/config.hpp>
  10. namespace boost { namespace fusion
  11. {
  12. struct iterator_root {};
  13. template <typename Iterator>
  14. struct iterator_base : iterator_root
  15. {
  16. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  17. Iterator const&
  18. cast() const BOOST_NOEXCEPT
  19. {
  20. return static_cast<Iterator const&>(*this);
  21. }
  22. BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  23. Iterator&
  24. cast() BOOST_NOEXCEPT
  25. {
  26. return static_cast<Iterator&>(*this);
  27. }
  28. };
  29. }}
  30. #endif