diff --git a/include/boost/regex.hpp b/include/boost/regex.hpp index 379024c0..0f258507 100644 --- a/include/boost/regex.hpp +++ b/include/boost/regex.hpp @@ -838,7 +838,7 @@ public: typedef Allocator alloc_type; typedef BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(iterator, Allocator) iterator_alloc; typedef typename iterator_alloc::size_type size_type; -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef typename std::iterator_traits::difference_type difference_type; typedef typename std::iterator_traits::value_type char_type; #else