From 6957a20ab1890cfb5301edb6e6cad5404dfae98f Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 5 Mar 2024 18:19:19 +0200 Subject: [PATCH] Avoid compilation errors caused by iterator_traits. Refs #36. --- include/boost/container_hash/is_range.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/container_hash/is_range.hpp b/include/boost/container_hash/is_range.hpp index f0b067f..e6adbce 100644 --- a/include/boost/container_hash/is_range.hpp +++ b/include/boost/container_hash/is_range.hpp @@ -14,8 +14,12 @@ namespace boost namespace hash_detail { +template struct iterator_traits: std::iterator_traits {}; +template<> struct iterator_traits< void* > {}; +template<> struct iterator_traits< void const* > {}; + template - std::integral_constant< bool, !std::is_same::type, typename std::iterator_traits::value_type>::value > + std::integral_constant< bool, !std::is_same::type, typename iterator_traits::value_type>::value > is_range_check( It first, It last ); template decltype( is_range_check( std::declval().begin(), std::declval().end() ) ) is_range_( int );