Index: boost/regex/pending/object_cache.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/regex/pending/object_cache.hpp,v retrieving revision 1.7 diff -u -b -r1.7 object_cache.hpp --- boost/regex/pending/object_cache.hpp 30 Nov 2005 13:56:54 -0000 1.7 +++ boost/regex/pending/object_cache.hpp 29 Jul 2006 15:42:38 -0000 @@ -35,16 +35,16 @@ class object_cache { public: - typedef std::pair< ::boost::shared_ptr, Key const*> value_type; + typedef std::pair< ::boost::shared_ptr, Key const*> value_type; typedef std::list list_type; typedef typename list_type::iterator list_iterator; typedef std::map map_type; typedef typename map_type::iterator map_iterator; typedef typename list_type::size_type size_type; - static boost::shared_ptr get(const Key& k, size_type max_cache_size); + static boost::shared_ptr get(const Key& k, size_type max_cache_size); private: - static boost::shared_ptr do_get(const Key& k, size_type max_cache_size); + static boost::shared_ptr do_get(const Key& k, size_type max_cache_size); struct data { @@ -58,7 +58,7 @@ }; template -boost::shared_ptr object_cache::get(const Key& k, size_type max_cache_size) +boost::shared_ptr object_cache::get(const Key& k, size_type max_cache_size) { #ifdef BOOST_HAS_THREADS static boost::static_mutex mut = BOOST_STATIC_MUTEX_INIT; @@ -80,7 +80,7 @@ } template -boost::shared_ptr object_cache::do_get(const Key& k, size_type max_cache_size) +boost::shared_ptr object_cache::do_get(const Key& k, size_type max_cache_size) { typedef typename object_cache::data object_data; typedef typename map_type::size_type map_size_type; @@ -115,7 +115,7 @@ // if we get here then the item is not in the cache, // so create it: // - boost::shared_ptr result(new Object(k)); + boost::shared_ptr result(new Object(k)); // // Add it to the list, and index it: // Index: boost/regex/v4/cpp_regex_traits.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/regex/v4/cpp_regex_traits.hpp,v retrieving revision 1.16 diff -u -b -r1.16 cpp_regex_traits.hpp --- boost/regex/v4/cpp_regex_traits.hpp 14 Sep 2005 12:20:07 -0000 1.16 +++ boost/regex/v4/cpp_regex_traits.hpp 29 Jul 2006 15:42:38 -0000 @@ -407,12 +407,12 @@ typedef charT char_type; //cpp_regex_traits_implementation(); cpp_regex_traits_implementation(const std::locale& l) - : cpp_regex_traits_char_layer(l), m_is(&m_sbuf) + : cpp_regex_traits_char_layer(l) { init(); } cpp_regex_traits_implementation(const cpp_regex_traits_base& l) - : cpp_regex_traits_char_layer(l), m_is(&m_sbuf) + : cpp_regex_traits_char_layer(l) { init(); } @@ -439,8 +439,6 @@ string_type lookup_collatename(const charT* p1, const charT* p2) const; string_type transform_primary(const charT* p1, const charT* p2) const; string_type transform(const charT* p1, const charT* p2) const; - re_detail::parser_buf m_sbuf; // buffer for parsing numbers. - std::basic_istream m_is; // stream for parsing numbers. private: std::map m_error_strings; // error messages indexed by numberic ID std::map m_custom_class_names; // character class names @@ -816,7 +814,7 @@ template -inline boost::shared_ptr > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +inline boost::shared_ptr > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) { cpp_regex_traits_base key(l); return ::boost::object_cache, cpp_regex_traits_implementation >::get(key, 5); @@ -954,7 +952,7 @@ static std::string get_catalog_name(); private: - boost::shared_ptr > m_pimpl; + boost::shared_ptr > m_pimpl; // // catalog name handler: // @@ -969,17 +967,21 @@ template int cpp_regex_traits::toi(const charT*& first, const charT* last, int radix)const { + re_detail::parser_buf sbuf; // buffer for parsing numbers. + std::basic_istream is(&sbuf); // stream for parsing numbers. + // 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; - else if(std::abs(radix) == 8) m_pimpl->m_is >> std::oct; - else m_pimpl->m_is >> std::dec; + last = std::find(first, last, BOOST_USE_FACET(std::numpunct, is.getloc()).thousands_sep()); + + sbuf.pubsetbuf(const_cast(static_cast(first)), static_cast(last-first)); + is.clear(); + if(std::abs(radix) == 16) is >> std::hex; + else if(std::abs(radix) == 8) is >> std::oct; + else is >> std::dec; int val; - if(m_pimpl->m_is >> val) + if(is >> val) { - first = first + ((last - first) - m_pimpl->m_sbuf.in_avail()); + first = first + ((last - first) - sbuf.in_avail()); return val; } else Index: boost/regex/v4/w32_regex_traits.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/regex/v4/w32_regex_traits.hpp,v retrieving revision 1.9 diff -u -b -r1.9 w32_regex_traits.hpp --- boost/regex/v4/w32_regex_traits.hpp 13 Dec 2005 17:24:28 -0000 1.9 +++ boost/regex/v4/w32_regex_traits.hpp 29 Jul 2006 15:42:39 -0000 @@ -166,7 +166,7 @@ { return ::boost::re_detail::w32_tolower(c, this->m_locale); } - bool isctype(boost::uint32_t mask, charT c) + bool isctype(boost::uint32_t mask, charT c)const { return ::boost::re_detail::w32_is(this->m_locale, mask, c); } @@ -263,7 +263,7 @@ { return m_lower_map[static_cast(c)]; } - bool isctype(boost::uint32_t mask, char c) + bool isctype(boost::uint32_t mask, char c)const { return m_type_map[static_cast(c)] & mask; } @@ -540,7 +540,7 @@ template -boost::shared_ptr > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +boost::shared_ptr > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) { // TODO: create a cache for previously constructed objects. return boost::object_cache< ::boost::re_detail::lcid_type, w32_regex_traits_implementation >::get(l, 5); @@ -654,7 +654,7 @@ static std::string get_catalog_name(); private: - boost::shared_ptr > m_pimpl; + boost::shared_ptr > m_pimpl; // // catalog name handler: //