forked from boostorg/regex
Added check for BOOST_NO_STD_DISTANCE
[SVN r16144]
This commit is contained in:
@ -213,7 +213,11 @@ public:
|
|||||||
}
|
}
|
||||||
void estimate_max_state_count(iterator a, iterator b, std::size_t states, std::random_access_iterator_tag*)
|
void estimate_max_state_count(iterator a, iterator b, std::size_t states, std::random_access_iterator_tag*)
|
||||||
{
|
{
|
||||||
|
#ifndef BOOST_NO_STD_DISTANCE
|
||||||
difference_type dist = std::distance(a,b);
|
difference_type dist = std::distance(a,b);
|
||||||
|
#else
|
||||||
|
difference_type dist = b - a;
|
||||||
|
#endif
|
||||||
states *= states;
|
states *= states;
|
||||||
difference_type lim = std::numeric_limits<difference_type>::max() - 1000 - states;
|
difference_type lim = std::numeric_limits<difference_type>::max() - 1000 - states;
|
||||||
if(dist > (difference_type)(lim / states))
|
if(dist > (difference_type)(lim / states))
|
||||||
|
Reference in New Issue
Block a user