iterator_base.hpp 843 B

12345678910111213141516171819202122232425262728293031
  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. namespace boost { namespace fusion
  9. {
  10. struct iterator_root {};
  11. template <typename Iterator>
  12. struct iterator_base : iterator_root
  13. {
  14. Iterator const&
  15. cast() const
  16. {
  17. return static_cast<Iterator const&>(*this);
  18. }
  19. Iterator&
  20. cast()
  21. {
  22. return static_cast<Iterator&>(*this);
  23. }
  24. };
  25. }}
  26. #endif