diff --git a/include/boost/regex/v4/cpp_regex_traits.hpp b/include/boost/regex/v4/cpp_regex_traits.hpp index 593271f4..98af56cf 100644 --- a/include/boost/regex/v4/cpp_regex_traits.hpp +++ b/include/boost/regex/v4/cpp_regex_traits.hpp @@ -961,6 +961,8 @@ private: template int cpp_regex_traits::toi(const charT*& first, const charT* last, int radix)const { + // we do NOT want to parse any thousands separators inside the stream: + last = std::find(first, last, BOOST_USE_FACET(std::numpunct, m_pimpl->m_is.getloc()).thousands_sep()); m_pimpl->m_sbuf.pubsetbuf(const_cast(static_cast(first)), static_cast(last-first)); m_pimpl->m_is.clear(); if(std::abs(radix) == 16) m_pimpl->m_is >> std::hex;