combine.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright Neil Groves 2010. Use, modification and
  2. // distribution is subject to the Boost Software License, Version
  3. // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. //
  6. //
  7. // For more information, see http://www.boost.org/libs/range/
  8. //
  9. #ifndef BOOST_RANGE_COMBINE_HPP
  10. #define BOOST_RANGE_COMBINE_HPP
  11. #include <boost/config.hpp>
  12. #include <boost/range/iterator_range_core.hpp>
  13. #include <boost/iterator/zip_iterator.hpp>
  14. namespace boost
  15. {
  16. namespace range
  17. {
  18. template<typename IterTuple>
  19. class combined_range
  20. : public iterator_range<zip_iterator<IterTuple> >
  21. {
  22. typedef iterator_range<zip_iterator<IterTuple> > base;
  23. public:
  24. combined_range(IterTuple first, IterTuple last)
  25. : base(first, last)
  26. {
  27. }
  28. };
  29. } // namespace range
  30. } // namespace boost
  31. #if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \
  32. defined(BOOST_NO_CXX11_DECLTYPE) || \
  33. defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \
  34. defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
  35. # include <boost/range/detail/combine_cxx03.hpp>
  36. #else
  37. # include <boost/range/detail/combine_cxx11.hpp>
  38. #endif
  39. #endif