iterator_range_hash.hpp 570 B

12345678910111213141516171819202122
  1. // Boost.Range library
  2. //
  3. // Copyright Neil Groves 2014
  4. // Use, modification and distribution is subject to the Boost Software
  5. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // For more information, see http://www.boost.org/libs/range/
  9. //
  10. #include <boost/range/iterator_range_core.hpp>
  11. #include <boost/functional/hash.hpp>
  12. namespace boost
  13. {
  14. template<class T>
  15. std::size_t hash_value(const iterator_range<T>& rng)
  16. {
  17. return boost::hash_range(rng.begin(), rng.end());
  18. }
  19. } // namespace boost