diff --git a/include/boost/container/scoped_allocator.hpp b/include/boost/container/scoped_allocator.hpp index 32b83bc..55514aa 100644 --- a/include/boost/container/scoped_allocator.hpp +++ b/include/boost/container/scoped_allocator.hpp @@ -1255,8 +1255,14 @@ inline bool operator==(const scoped_allocator_adaptor::value; #endif - return a.outer_allocator() == b.outer_allocator() - && (has_zero_inner || a.inner_allocator() == b.inner_allocator()); + typedef typename scoped_allocator_adaptor + ::outer_allocator_type outer_allocator_type; + typedef typename scoped_allocator_adaptor + ::inner_allocator_type inner_allocator_type; + + return allocator_traits::equal(a.outer_allocator(), b.outer_allocator()) + && (has_zero_inner || + allocator_traits::equal(a.inner_allocator(), b.inner_allocator())); } template