int toi(InIter &begin, InIter end, Traits const &traits, int radix = 10, int max = INT_MAX) { int i = 0, c = 0; for(; begin != end && -1 != (c = traits.value(*begin, radix)); ++begin) { if(max < ((i *= radix) += c)) return i / radix; } return i; }
int toi(InIter &begin, InIter end, Traits const &tr, int radix = 10, int max = INT_MAX) { detail::ignore_unused(tr); int i = 0, c = 0; for(; begin != end && -1 != (c = tr.value(*begin, radix)); ++begin) { if(max < ((i *= radix) += c)) return i / radix; } return i; }