shared_ptr -> std::shared_ptr

This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
This commit is contained in:
void_17
2026-03-02 15:58:20 +07:00
parent d63f79325f
commit 7074f35e4b
1373 changed files with 12054 additions and 12054 deletions

View File

@@ -3,8 +3,8 @@
* Copyright (c) 2004
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
@@ -36,7 +36,7 @@ namespace boost{
namespace re_detail{
//
//
// Implementation details:
//
class BOOST_REGEX_DECL icu_regex_traits_implementation
@@ -85,9 +85,9 @@ private:
boost::scoped_ptr< U_NAMESPACE_QUALIFIER Collator> m_primary_collator; // The primary collation object
};
inline boost::shared_ptr<icu_regex_traits_implementation> get_icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& loc)
inline boost::std::shared_ptr<icu_regex_traits_implementation> get_icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& loc)
{
return boost::shared_ptr<icu_regex_traits_implementation>(new icu_regex_traits_implementation(loc));
return boost::std::shared_ptr<icu_regex_traits_implementation>(new icu_regex_traits_implementation(loc));
}
}
@@ -208,7 +208,7 @@ private:
static char_class_type lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2);
boost::shared_ptr< ::boost::re_detail::icu_regex_traits_implementation> m_pimpl;
boost::std::shared_ptr< ::boost::re_detail::icu_regex_traits_implementation> m_pimpl;
};
} // namespace boost
@@ -245,9 +245,9 @@ namespace re_detail{
#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__)
template <class InputIterator>
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
const boost::mpl::int_<1>*)
{
typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type;
@@ -255,9 +255,9 @@ inline u32regex do_make_u32regex(InputIterator i,
}
template <class InputIterator>
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
const boost::mpl::int_<2>*)
{
typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type;
@@ -265,18 +265,18 @@ inline u32regex do_make_u32regex(InputIterator i,
}
template <class InputIterator>
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
const boost::mpl::int_<4>*)
{
return u32regex(i, j, opt);
}
#else
template <class InputIterator>
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
const boost::mpl::int_<1>*)
{
typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type;
@@ -294,9 +294,9 @@ inline u32regex do_make_u32regex(InputIterator i,
}
template <class InputIterator>
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
const boost::mpl::int_<2>*)
{
typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type;
@@ -314,9 +314,9 @@ inline u32regex do_make_u32regex(InputIterator i,
}
template <class InputIterator>
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
inline u32regex do_make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt,
const boost::mpl::int_<4>*)
{
typedef std::vector<UChar32> vector_type;
@@ -337,8 +337,8 @@ inline u32regex do_make_u32regex(InputIterator i,
// Construction from an iterator pair:
//
template <class InputIterator>
inline u32regex make_u32regex(InputIterator i,
InputIterator j,
inline u32regex make_u32regex(InputIterator i,
InputIterator j,
boost::regex_constants::syntax_option_type opt)
{
return re_detail::do_make_u32regex(i, j, opt, static_cast<boost::mpl::int_<sizeof(*i)> const*>(0));
@@ -406,18 +406,18 @@ void copy_results(MR1& out, MR2 const& in)
}
template <class BidiIterator, class Allocator>
inline bool do_regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
inline bool do_regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
match_flag_type flags,
boost::mpl::int_<4> const*)
{
return ::boost::regex_match(first, last, m, e, flags);
}
template <class BidiIterator, class Allocator>
bool do_regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
bool do_regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
match_flag_type flags,
boost::mpl::int_<2> const*)
{
@@ -431,9 +431,9 @@ bool do_regex_match(BidiIterator first, BidiIterator last,
return result;
}
template <class BidiIterator, class Allocator>
bool do_regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
bool do_regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
match_flag_type flags,
boost::mpl::int_<1> const*)
{
@@ -449,62 +449,62 @@ bool do_regex_match(BidiIterator first, BidiIterator last,
} // namespace re_detail
template <class BidiIterator, class Allocator>
inline bool u32regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
inline bool u32regex_match(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_match(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0));
}
inline bool u32regex_match(const UChar* p,
match_results<const UChar*>& m,
const u32regex& e,
inline bool u32regex_match(const UChar* p,
match_results<const UChar*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
}
#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
inline bool u32regex_match(const wchar_t* p,
match_results<const wchar_t*>& m,
const u32regex& e,
inline bool u32regex_match(const wchar_t* p,
match_results<const wchar_t*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
}
#endif
inline bool u32regex_match(const char* p,
match_results<const char*>& m,
const u32regex& e,
inline bool u32regex_match(const char* p,
match_results<const char*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
}
inline bool u32regex_match(const unsigned char* p,
match_results<const unsigned char*>& m,
const u32regex& e,
inline bool u32regex_match(const unsigned char* p,
match_results<const unsigned char*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
}
inline bool u32regex_match(const std::string& s,
match_results<std::string::const_iterator>& m,
const u32regex& e,
inline bool u32regex_match(const std::string& s,
match_results<std::string::const_iterator>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0));
}
#ifndef BOOST_NO_STD_WSTRING
inline bool u32regex_match(const std::wstring& s,
match_results<std::wstring::const_iterator>& m,
const u32regex& e,
inline bool u32regex_match(const std::wstring& s,
match_results<std::wstring::const_iterator>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
}
#endif
inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
match_results<const UChar*>& m,
const u32regex& e,
inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
match_results<const UChar*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_match(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
@@ -513,61 +513,61 @@ inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
// regex_match overloads that do not return what matched:
//
template <class BidiIterator>
inline bool u32regex_match(BidiIterator first, BidiIterator last,
const u32regex& e,
inline bool u32regex_match(BidiIterator first, BidiIterator last,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<BidiIterator> m;
return re_detail::do_regex_match(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0));
}
inline bool u32regex_match(const UChar* p,
const u32regex& e,
inline bool u32regex_match(const UChar* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const UChar*> m;
return re_detail::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
}
#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
inline bool u32regex_match(const wchar_t* p,
const u32regex& e,
inline bool u32regex_match(const wchar_t* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const wchar_t*> m;
return re_detail::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
}
#endif
inline bool u32regex_match(const char* p,
const u32regex& e,
inline bool u32regex_match(const char* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const char*> m;
return re_detail::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
}
inline bool u32regex_match(const unsigned char* p,
const u32regex& e,
inline bool u32regex_match(const unsigned char* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const unsigned char*> m;
return re_detail::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
}
inline bool u32regex_match(const std::string& s,
const u32regex& e,
inline bool u32regex_match(const std::string& s,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<std::string::const_iterator> m;
return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0));
}
#ifndef BOOST_NO_STD_WSTRING
inline bool u32regex_match(const std::wstring& s,
const u32regex& e,
inline bool u32regex_match(const std::wstring& s,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<std::wstring::const_iterator> m;
return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
}
#endif
inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
const u32regex& e,
inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const UChar*> m;
@@ -579,9 +579,9 @@ inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
//
namespace re_detail{
template <class BidiIterator, class Allocator>
inline bool do_regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
inline bool do_regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
match_flag_type flags,
BidiIterator base,
boost::mpl::int_<4> const*)
@@ -589,9 +589,9 @@ inline bool do_regex_search(BidiIterator first, BidiIterator last,
return ::boost::regex_search(first, last, m, e, flags, base);
}
template <class BidiIterator, class Allocator>
bool do_regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
bool do_regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
match_flag_type flags,
BidiIterator base,
boost::mpl::int_<2> const*)
@@ -606,9 +606,9 @@ bool do_regex_search(BidiIterator first, BidiIterator last,
return result;
}
template <class BidiIterator, class Allocator>
bool do_regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
bool do_regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
match_flag_type flags,
BidiIterator base,
boost::mpl::int_<1> const*)
@@ -625,131 +625,131 @@ bool do_regex_search(BidiIterator first, BidiIterator last,
}
template <class BidiIterator, class Allocator>
inline bool u32regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
inline bool u32regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_search(first, last, m, e, flags, first, static_cast<mpl::int_<sizeof(*first)> const*>(0));
}
template <class BidiIterator, class Allocator>
inline bool u32regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
inline bool u32regex_search(BidiIterator first, BidiIterator last,
match_results<BidiIterator, Allocator>& m,
const u32regex& e,
match_flag_type flags,
BidiIterator base)
{
return re_detail::do_regex_search(first, last, m, e, flags, base, static_cast<mpl::int_<sizeof(*first)> const*>(0));
}
inline bool u32regex_search(const UChar* p,
match_results<const UChar*>& m,
const u32regex& e,
inline bool u32regex_search(const UChar* p,
match_results<const UChar*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<mpl::int_<2> const*>(0));
}
#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
inline bool u32regex_search(const wchar_t* p,
match_results<const wchar_t*>& m,
const u32regex& e,
inline bool u32regex_search(const wchar_t* p,
match_results<const wchar_t*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
}
#endif
inline bool u32regex_search(const char* p,
match_results<const char*>& m,
const u32regex& e,
inline bool u32regex_search(const char* p,
match_results<const char*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
}
inline bool u32regex_search(const unsigned char* p,
match_results<const unsigned char*>& m,
const u32regex& e,
inline bool u32regex_search(const unsigned char* p,
match_results<const unsigned char*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
}
inline bool u32regex_search(const std::string& s,
match_results<std::string::const_iterator>& m,
const u32regex& e,
inline bool u32regex_search(const std::string& s,
match_results<std::string::const_iterator>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<1> const*>(0));
}
#ifndef BOOST_NO_STD_WSTRING
inline bool u32regex_search(const std::wstring& s,
match_results<std::wstring::const_iterator>& m,
const u32regex& e,
inline bool u32regex_search(const std::wstring& s,
match_results<std::wstring::const_iterator>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
}
#endif
inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
match_results<const UChar*>& m,
const u32regex& e,
inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
match_results<const UChar*>& m,
const u32regex& e,
match_flag_type flags = match_default)
{
return re_detail::do_regex_search(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, s.getBuffer(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
}
template <class BidiIterator>
inline bool u32regex_search(BidiIterator first, BidiIterator last,
const u32regex& e,
inline bool u32regex_search(BidiIterator first, BidiIterator last,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<BidiIterator> m;
return re_detail::do_regex_search(first, last, m, e, flags, first, static_cast<mpl::int_<sizeof(*first)> const*>(0));
}
inline bool u32regex_search(const UChar* p,
const u32regex& e,
inline bool u32regex_search(const UChar* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const UChar*> m;
return re_detail::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<mpl::int_<2> const*>(0));
}
#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
inline bool u32regex_search(const wchar_t* p,
const u32regex& e,
inline bool u32regex_search(const wchar_t* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const wchar_t*> m;
return re_detail::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
}
#endif
inline bool u32regex_search(const char* p,
const u32regex& e,
inline bool u32regex_search(const char* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const char*> m;
return re_detail::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
}
inline bool u32regex_search(const unsigned char* p,
const u32regex& e,
inline bool u32regex_search(const unsigned char* p,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const unsigned char*> m;
return re_detail::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
}
inline bool u32regex_search(const std::string& s,
const u32regex& e,
inline bool u32regex_search(const std::string& s,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<std::string::const_iterator> m;
return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<1> const*>(0));
}
#ifndef BOOST_NO_STD_WSTRING
inline bool u32regex_search(const std::wstring& s,
const u32regex& e,
inline bool u32regex_search(const std::wstring& s,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<std::wstring::const_iterator> m;
return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
}
#endif
inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
const u32regex& e,
inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
const u32regex& e,
match_flag_type flags = match_default)
{
match_results<const UChar*> m;
@@ -817,8 +817,8 @@ inline utf8_output_iterator<OutputIterator> make_utf32_out(OutputIterator o, mpl
template <class OutputIterator, class I1, class I2>
OutputIterator do_regex_replace(OutputIterator out,
std::pair<I1, I1> const& in,
const u32regex& e,
const std::pair<I2, I2>& fmt,
const u32regex& e,
const std::pair<I2, I2>& fmt,
match_flag_type flags
)
{
@@ -832,7 +832,7 @@ OutputIterator do_regex_replace(OutputIterator out,
while(pos != fmt.second)
f.push_back(*pos++);
#endif
regex_iterator<I1, UChar32, icu_regex_traits> i(in.first, in.second, e, flags);
regex_iterator<I1, UChar32, icu_regex_traits> j;
if(i == j)
@@ -846,7 +846,7 @@ OutputIterator do_regex_replace(OutputIterator out,
while(i != j)
{
if(!(flags & regex_constants::format_no_copy))
out = re_detail::copy(i->prefix().first, i->prefix().second, out);
out = re_detail::copy(i->prefix().first, i->prefix().second, out);
if(f.size())
out = ::boost::re_detail::regex_format_imp(out, *i, &*f.begin(), &*f.begin() + f.size(), flags, e.get_traits());
else
@@ -882,8 +882,8 @@ template <class OutputIterator, class BidirectionalIterator, class charT>
inline OutputIterator u32regex_replace(OutputIterator out,
BidirectionalIterator first,
BidirectionalIterator last,
const u32regex& e,
const charT* fmt,
const u32regex& e,
const charT* fmt,
match_flag_type flags = match_default)
{
return re_detail::extract_output_base
@@ -904,7 +904,7 @@ template <class OutputIterator, class Iterator, class charT>
inline OutputIterator u32regex_replace(OutputIterator out,
Iterator first,
Iterator last,
const u32regex& e,
const u32regex& e,
const std::basic_string<charT>& fmt,
match_flag_type flags = match_default)
{
@@ -926,7 +926,7 @@ template <class OutputIterator, class Iterator>
inline OutputIterator u32regex_replace(OutputIterator out,
Iterator first,
Iterator last,
const u32regex& e,
const u32regex& e,
const U_NAMESPACE_QUALIFIER UnicodeString& fmt,
match_flag_type flags = match_default)
{
@@ -946,7 +946,7 @@ inline OutputIterator u32regex_replace(OutputIterator out,
template <class charT>
std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
const u32regex& e,
const u32regex& e,
const charT* fmt,
match_flag_type flags = match_default)
{
@@ -958,7 +958,7 @@ std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
template <class charT>
std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
const u32regex& e,
const u32regex& e,
const std::basic_string<charT>& fmt,
match_flag_type flags = match_default)
{
@@ -978,10 +978,10 @@ public:
unicode_string_out_iterator& operator++() { return *this; }
unicode_string_out_iterator& operator++(int) { return *this; }
unicode_string_out_iterator& operator*() { return *this; }
unicode_string_out_iterator& operator=(UChar v)
{
*out += v;
return *this;
unicode_string_out_iterator& operator=(UChar v)
{
*out += v;
return *this;
}
typedef std::ptrdiff_t difference_type;
typedef UChar value_type;
@@ -993,7 +993,7 @@ public:
}
inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s,
const u32regex& e,
const u32regex& e,
const UChar* fmt,
match_flag_type flags = match_default)
{
@@ -1004,7 +1004,7 @@ inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QU
}
inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s,
const u32regex& e,
const u32regex& e,
const U_NAMESPACE_QUALIFIER UnicodeString& fmt,
match_flag_type flags = match_default)
{

View File

@@ -3,8 +3,8 @@
* Copyright (c) 2004
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
@@ -24,7 +24,7 @@
#include <stdexcept>
#include <string>
#include <boost/config.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#ifdef BOOST_HAS_THREADS
#include <boost/regex/pending/static_mutex.hpp>
#endif
@@ -35,16 +35,16 @@ template <class Key, class Object>
class object_cache
{
public:
typedef std::pair< ::boost::shared_ptr<Object const>, Key const*> value_type;
typedef std::pair< ::boost::std::shared_ptr<Object const>, Key const*> value_type;
typedef std::list<value_type> list_type;
typedef typename list_type::iterator list_iterator;
typedef std::map<Key, list_iterator> map_type;
typedef typename map_type::iterator map_iterator;
typedef typename list_type::size_type size_type;
static boost::shared_ptr<Object const> get(const Key& k, size_type l_max_cache_size);
static boost::std::shared_ptr<Object const> get(const Key& k, size_type l_max_cache_size);
private:
static boost::shared_ptr<Object const> do_get(const Key& k, size_type l_max_cache_size);
static boost::std::shared_ptr<Object const> do_get(const Key& k, size_type l_max_cache_size);
struct data
{
@@ -58,7 +58,7 @@ private:
};
template <class Key, class Object>
boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, size_type l_max_cache_size)
boost::std::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, size_type l_max_cache_size)
{
#ifdef BOOST_HAS_THREADS
static boost::static_mutex mut = BOOST_STATIC_MUTEX_INIT;
@@ -74,7 +74,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, siz
//
::boost::throw_exception(std::runtime_error("Error in thread safety code: could not acquire a lock"));
#if defined(BOOST_NO_UNREACHABLE_RETURN_DETECTION) || defined(BOOST_NO_EXCEPTIONS)
return boost::shared_ptr<Object>();
return boost::std::shared_ptr<Object>();
#endif
#else
return do_get(k, l_max_cache_size);
@@ -82,7 +82,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, siz
}
template <class Key, class Object>
boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k, size_type l_max_cache_size)
boost::std::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k, size_type l_max_cache_size)
{
typedef typename object_cache<Key, Object>::data object_data;
typedef typename map_type::size_type map_size_type;
@@ -95,7 +95,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k,
if(mpos != s_data.index.end())
{
//
// Eureka!
// Eureka!
// We have a cached item, bump it up the list and return it:
//
if(--(s_data.cont.end()) != mpos->second)
@@ -117,7 +117,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k,
// if we get here then the item is not in the cache,
// so create it:
//
boost::shared_ptr<Object const> result(new Object(k));
boost::std::shared_ptr<Object const> result(new Object(k));
//
// Add it to the list, and index it:
//
@@ -143,11 +143,11 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k,
{
list_iterator condemmed(pos);
++pos;
// now remove the items from our containers,
// now remove the items from our containers,
// then order has to be as follows:
BOOST_ASSERT(s_data.index.find(*(condemmed->second)) != s_data.index.end());
s_data.index.erase(*(condemmed->second));
s_data.cont.erase(condemmed);
s_data.cont.erase(condemmed);
--s;
}
else

View File

@@ -80,13 +80,13 @@ public:
{
template <class charT>
name(const charT* i, const charT* j, int idx)
: index(idx)
{
hash = hash_value_from_capture_name(i, j);
: index(idx)
{
hash = hash_value_from_capture_name(i, j);
}
name(int h, int idx)
: index(idx), hash(h)
{
{
}
int index;
int hash;
@@ -96,7 +96,7 @@ public:
}
bool operator == (const name& other)const
{
return hash == other.hash;
return hash == other.hash;
}
void swap(name& other)
{
@@ -160,15 +160,15 @@ template <class charT, class traits>
struct regex_data : public named_subexpressions
{
typedef regex_constants::syntax_option_type flag_type;
typedef std::size_t size_type;
typedef std::size_t size_type;
regex_data(const ::boost::shared_ptr<
::boost::regex_traits_wrapper<traits> >& t)
regex_data(const ::boost::std::shared_ptr<
::boost::regex_traits_wrapper<traits> >& t)
: m_ptraits(t), m_expression(0), m_expression_len(0) {}
regex_data()
regex_data()
: m_ptraits(new ::boost::regex_traits_wrapper<traits>()), m_expression(0), m_expression_len(0) {}
::boost::shared_ptr<
::boost::std::shared_ptr<
::boost::regex_traits_wrapper<traits>
> m_ptraits; // traits class instance
flag_type m_flags; // flags with which we were compiled
@@ -198,12 +198,12 @@ class basic_regex_implementation
public:
typedef regex_constants::syntax_option_type flag_type;
typedef std::ptrdiff_t difference_type;
typedef std::size_t size_type;
typedef std::size_t size_type;
typedef typename traits::locale_type locale_type;
typedef const charT* const_iterator;
basic_regex_implementation(){}
basic_regex_implementation(const ::boost::shared_ptr<
basic_regex_implementation(const ::boost::std::shared_ptr<
::boost::regex_traits_wrapper<traits> >& t)
: regex_data<charT, traits>(t) {}
void assign(const charT* arg_first,
@@ -216,12 +216,12 @@ public:
}
locale_type BOOST_REGEX_CALL imbue(locale_type l)
{
return this->m_ptraits->imbue(l);
{
return this->m_ptraits->imbue(l);
}
locale_type BOOST_REGEX_CALL getloc()const
{
return this->m_ptraits->getloc();
{
return this->m_ptraits->getloc();
}
std::basic_string<charT> BOOST_REGEX_CALL str()const
{
@@ -245,12 +245,12 @@ public:
//
// begin, end:
const_iterator BOOST_REGEX_CALL begin()const
{
return (this->m_status ? 0 : this->m_expression);
{
return (this->m_status ? 0 : this->m_expression);
}
const_iterator BOOST_REGEX_CALL end()const
{
return (this->m_status ? 0 : this->m_expression + this->m_expression_len);
{
return (this->m_status ? 0 : this->m_expression + this->m_expression_len);
}
flag_type BOOST_REGEX_CALL flags()const
{
@@ -322,13 +322,13 @@ public:
typedef const charT* const_iterator;
typedef const_iterator iterator;
typedef std::ptrdiff_t difference_type;
typedef std::size_t size_type;
typedef std::size_t size_type;
typedef regex_constants::syntax_option_type flag_type;
// locale_type
// placeholder for actual locale type used by the
// traits class to localise *this.
typedef typename traits::locale_type locale_type;
public:
explicit basic_regex(){}
explicit basic_regex(const charT* p, flag_type f = regex_constants::normal)
@@ -358,9 +358,9 @@ public:
//
// assign:
basic_regex& assign(const basic_regex& that)
{
{
m_pimpl = that.m_pimpl;
return *this;
return *this;
}
basic_regex& assign(const charT* p, flag_type f = regex_constants::normal)
{
@@ -385,14 +385,14 @@ public:
template <class ST, class SA>
unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
{
return set_expression(p.data(), p.data() + p.size(), f);
{
return set_expression(p.data(), p.data() + p.size(), f);
}
template <class ST, class SA>
explicit basic_regex(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
{
assign(p, f);
{
assign(p, f);
}
template <class InputIterator>
@@ -437,13 +437,13 @@ public:
}
#else
unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
{
return set_expression(p.data(), p.data() + p.size(), f);
{
return set_expression(p.data(), p.data() + p.size(), f);
}
basic_regex(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
{
assign(p, f);
{
assign(p, f);
}
basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
@@ -464,19 +464,19 @@ public:
// locale:
locale_type BOOST_REGEX_CALL imbue(locale_type l);
locale_type BOOST_REGEX_CALL getloc()const
{
return m_pimpl.get() ? m_pimpl->getloc() : locale_type();
{
return m_pimpl.get() ? m_pimpl->getloc() : locale_type();
}
//
// getflags:
// retained for backwards compatibility only, "flags"
// is now the preferred name:
flag_type BOOST_REGEX_CALL getflags()const
{
{
return flags();
}
flag_type BOOST_REGEX_CALL flags()const
{
{
return m_pimpl.get() ? m_pimpl->flags() : 0;
}
//
@@ -494,12 +494,12 @@ public:
return m_pimpl->subexpression(n);
}
const_iterator BOOST_REGEX_CALL begin()const
{
return (m_pimpl.get() ? m_pimpl->begin() : 0);
{
return (m_pimpl.get() ? m_pimpl->begin() : 0);
}
const_iterator BOOST_REGEX_CALL end()const
{
return (m_pimpl.get() ? m_pimpl->end() : 0);
{
return (m_pimpl.get() ? m_pimpl->end() : 0);
}
//
// swap:
@@ -510,25 +510,25 @@ public:
//
// size:
size_type BOOST_REGEX_CALL size()const
{
return (m_pimpl.get() ? m_pimpl->size() : 0);
{
return (m_pimpl.get() ? m_pimpl->size() : 0);
}
//
// max_size:
size_type BOOST_REGEX_CALL max_size()const
{
return UINT_MAX;
{
return UINT_MAX;
}
//
// empty:
bool BOOST_REGEX_CALL empty()const
{
return (m_pimpl.get() ? 0 != m_pimpl->status() : true);
{
return (m_pimpl.get() ? 0 != m_pimpl->status() : true);
}
size_type BOOST_REGEX_CALL mark_count()const
{
return (m_pimpl.get() ? m_pimpl->mark_count() : 0);
size_type BOOST_REGEX_CALL mark_count()const
{
return (m_pimpl.get() ? m_pimpl->mark_count() : 0);
}
int status()const
@@ -551,45 +551,45 @@ public:
return str().compare(that.str());
}
bool BOOST_REGEX_CALL operator==(const basic_regex& e)const
{
return compare(e) == 0;
{
return compare(e) == 0;
}
bool BOOST_REGEX_CALL operator != (const basic_regex& e)const
{
return compare(e) != 0;
{
return compare(e) != 0;
}
bool BOOST_REGEX_CALL operator<(const basic_regex& e)const
{
return compare(e) < 0;
{
return compare(e) < 0;
}
bool BOOST_REGEX_CALL operator>(const basic_regex& e)const
{
return compare(e) > 0;
{
return compare(e) > 0;
}
bool BOOST_REGEX_CALL operator<=(const basic_regex& e)const
{
return compare(e) <= 0;
{
return compare(e) <= 0;
}
bool BOOST_REGEX_CALL operator>=(const basic_regex& e)const
{
return compare(e) >= 0;
{
return compare(e) >= 0;
}
//
// The following are deprecated as public interfaces
// but are available for compatibility with earlier versions.
const charT* BOOST_REGEX_CALL expression()const
{
return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0);
const charT* BOOST_REGEX_CALL expression()const
{
return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0);
}
unsigned int BOOST_REGEX_CALL set_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
{
assign(p1, p2, f | regex_constants::no_except);
return status();
}
unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal)
{
assign(p, f | regex_constants::no_except);
unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal)
{
assign(p, f | regex_constants::no_except);
return status();
}
unsigned int BOOST_REGEX_CALL error_code()const
@@ -629,13 +629,13 @@ public:
BOOST_ASSERT(0 != m_pimpl.get());
return m_pimpl->get_data();
}
boost::shared_ptr<re_detail::named_subexpressions > get_named_subs()const
boost::std::shared_ptr<re_detail::named_subexpressions > get_named_subs()const
{
return m_pimpl;
}
private:
shared_ptr<re_detail::basic_regex_implementation<charT, traits> > m_pimpl;
std::shared_ptr<re_detail::basic_regex_implementation<charT, traits> > m_pimpl;
};
//
@@ -649,14 +649,14 @@ basic_regex<charT, traits>& basic_regex<charT, traits>::do_assign(const charT* p
const charT* p2,
flag_type f)
{
shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp;
std::shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp;
if(!m_pimpl.get())
{
temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>());
temp = std::shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>());
}
else
{
temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>(m_pimpl->m_ptraits));
temp = std::shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>(m_pimpl->m_ptraits));
}
temp->assign(p1, p2, f);
temp.swap(m_pimpl);
@@ -665,8 +665,8 @@ basic_regex<charT, traits>& basic_regex<charT, traits>::do_assign(const charT* p
template <class charT, class traits>
typename basic_regex<charT, traits>::locale_type BOOST_REGEX_CALL basic_regex<charT, traits>::imbue(locale_type l)
{
shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp(new re_detail::basic_regex_implementation<charT, traits>());
{
std::shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp(new re_detail::basic_regex_implementation<charT, traits>());
locale_type result = temp->imbue(l);
temp.swap(m_pimpl);
return result;
@@ -683,8 +683,8 @@ void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2)
#ifndef BOOST_NO_STD_LOCALE
template <class charT, class traits, class traits2>
std::basic_ostream<charT, traits>&
operator << (std::basic_ostream<charT, traits>& os,
std::basic_ostream<charT, traits>&
operator << (std::basic_ostream<charT, traits>& os,
const basic_regex<charT, traits2>& e)
{
return (os << e.str());
@@ -731,7 +731,7 @@ public:
template <class ST, class SA>
explicit reg_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
: basic_regex<charT, traits>(p, f)
{
{
}
template <class InputIterator>
@@ -749,7 +749,7 @@ public:
#else
explicit reg_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
: basic_regex<charT, traits>(p, f)
{
{
}
reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)

View File

@@ -3,12 +3,12 @@
* Copyright (c) 2004 John Maddock
* Copyright 2011 Garmin Ltd. or its subsidiaries
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE cpp_regex_traits.hpp
@@ -60,14 +60,14 @@
#pragma warning(disable:4786 4251)
#endif
namespace boost{
namespace boost{
//
// forward declaration is needed by some compilers:
//
template <class charT>
class cpp_regex_traits;
namespace re_detail{
//
@@ -201,9 +201,9 @@ struct cpp_regex_traits_base
}
bool operator==(const cpp_regex_traits_base& b)const
{
return (m_pctype == b.m_pctype)
return (m_pctype == b.m_pctype)
#ifndef BOOST_NO_STD_MESSAGES
&& (m_pmessages == b.m_pmessages)
&& (m_pmessages == b.m_pmessages)
#endif
&& (m_pcollate == b.m_pcollate);
}
@@ -283,7 +283,7 @@ void cpp_regex_traits_char_layer<charT>::init()
if(cat_name.size() && (this->m_pmessages != 0))
{
cat = this->m_pmessages->open(
cat_name,
cat_name,
this->m_locale);
if((int)cat < 0)
{
@@ -337,7 +337,7 @@ void cpp_regex_traits_char_layer<charT>::init()
}
template <class charT>
typename cpp_regex_traits_char_layer<charT>::string_type
typename cpp_regex_traits_char_layer<charT>::string_type
cpp_regex_traits_char_layer<charT>::get_default_message(regex_constants::syntax_type i)
{
const char* ptr = get_default_syntax(i);
@@ -386,16 +386,16 @@ private:
#ifdef BOOST_REGEX_BUGGY_CTYPE_FACET
enum
{
char_class_space=1<<0,
char_class_print=1<<1,
char_class_cntrl=1<<2,
char_class_upper=1<<3,
char_class_space=1<<0,
char_class_print=1<<1,
char_class_cntrl=1<<2,
char_class_upper=1<<3,
char_class_lower=1<<4,
char_class_alpha=1<<5,
char_class_digit=1<<6,
char_class_punct=1<<7,
char_class_alpha=1<<5,
char_class_digit=1<<6,
char_class_punct=1<<7,
char_class_xdigit=1<<8,
char_class_alnum=char_class_alpha|char_class_digit,
char_class_alnum=char_class_alpha|char_class_digit,
char_class_graph=char_class_alnum|char_class_punct,
char_class_blank=1<<9,
char_class_word=1<<10,
@@ -495,14 +495,14 @@ typename cpp_regex_traits_implementation<charT>::char_class_type const cpp_regex
#endif
template <class charT>
typename cpp_regex_traits_implementation<charT>::string_type
typename cpp_regex_traits_implementation<charT>::string_type
cpp_regex_traits_implementation<charT>::transform_primary(const charT* p1, const charT* p2) const
{
//
// PRECONDITIONS:
//
// A bug in gcc 3.2 (and maybe other versions as well) treats
// p1 as a null terminated string, for efficiency reasons
// p1 as a null terminated string, for efficiency reasons
// we work around this elsewhere, but just assert here that
// we adhere to gcc's (buggy) preconditions...
//
@@ -565,14 +565,14 @@ typename cpp_regex_traits_implementation<charT>::string_type
}
template <class charT>
typename cpp_regex_traits_implementation<charT>::string_type
typename cpp_regex_traits_implementation<charT>::string_type
cpp_regex_traits_implementation<charT>::transform(const charT* p1, const charT* p2) const
{
//
// PRECONDITIONS:
//
// A bug in gcc 3.2 (and maybe other versions as well) treats
// p1 as a null terminated string, for efficiency reasons
// p1 as a null terminated string, for efficiency reasons
// we work around this elsewhere, but just assert here that
// we adhere to gcc's (buggy) preconditions...
//
@@ -613,7 +613,7 @@ typename cpp_regex_traits_implementation<charT>::string_type
template <class charT>
typename cpp_regex_traits_implementation<charT>::string_type
typename cpp_regex_traits_implementation<charT>::string_type
cpp_regex_traits_implementation<charT>::lookup_collatename(const charT* p1, const charT* p2) const
{
typedef typename std::map<string_type, string_type>::const_iterator iter_type;
@@ -669,7 +669,7 @@ void cpp_regex_traits_implementation<charT>::init()
if(cat_name.size() && (this->m_pmessages != 0))
{
cat = this->m_pmessages->open(
cat_name,
cat_name,
this->m_locale);
if((int)cat < 0)
{
@@ -686,8 +686,8 @@ void cpp_regex_traits_implementation<charT>::init()
//
// Error messages:
//
for(boost::regex_constants::error_type i = static_cast<boost::regex_constants::error_type>(0);
i <= boost::regex_constants::error_unknown;
for(boost::regex_constants::error_type i = static_cast<boost::regex_constants::error_type>(0);
i <= boost::regex_constants::error_unknown;
i = static_cast<boost::regex_constants::error_type>(i + 1))
{
const char* p = get_default_error_string(i);
@@ -709,7 +709,7 @@ void cpp_regex_traits_implementation<charT>::init()
// Custom class names:
//
#ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
static const char_class_type masks[16] =
static const char_class_type masks[16] =
{
std::ctype<charT>::alnum,
std::ctype<charT>::alpha,
@@ -729,7 +729,7 @@ void cpp_regex_traits_implementation<charT>::init()
cpp_regex_traits_implementation<charT>::mask_unicode,
};
#else
static const char_class_type masks[16] =
static const char_class_type masks[16] =
{
::boost::re_detail::char_class_alnum,
::boost::re_detail::char_class_alpha,
@@ -765,14 +765,14 @@ void cpp_regex_traits_implementation<charT>::init()
}
template <class charT>
typename cpp_regex_traits_implementation<charT>::char_class_type
typename cpp_regex_traits_implementation<charT>::char_class_type
cpp_regex_traits_implementation<charT>::lookup_classname_imp(const charT* p1, const charT* p2) const
{
#ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
static const char_class_type masks[22] =
static const char_class_type masks[22] =
{
0,
std::ctype<char>::alnum,
std::ctype<char>::alnum,
std::ctype<char>::alpha,
cpp_regex_traits_implementation<charT>::mask_blank,
std::ctype<char>::cntrl,
@@ -790,15 +790,15 @@ typename cpp_regex_traits_implementation<charT>::char_class_type
cpp_regex_traits_implementation<charT>::mask_unicode,
std::ctype<char>::upper,
cpp_regex_traits_implementation<charT>::mask_vertical,
std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word,
std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word,
std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word,
std::ctype<char>::alnum | cpp_regex_traits_implementation<charT>::mask_word,
std::ctype<char>::xdigit,
};
#else
static const char_class_type masks[22] =
static const char_class_type masks[22] =
{
0,
::boost::re_detail::char_class_alnum,
::boost::re_detail::char_class_alnum,
::boost::re_detail::char_class_alpha,
::boost::re_detail::char_class_blank,
::boost::re_detail::char_class_cntrl,
@@ -816,8 +816,8 @@ typename cpp_regex_traits_implementation<charT>::char_class_type
::boost::re_detail::char_class_unicode,
::boost::re_detail::char_class_upper,
::boost::re_detail::char_class_vertical_space,
::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word,
::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word,
::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word,
::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word,
::boost::re_detail::char_class_xdigit,
};
#endif
@@ -857,7 +857,7 @@ bool cpp_regex_traits_implementation<charT>::isctype(const charT c, char_class_t
template <class charT>
inline boost::shared_ptr<const cpp_regex_traits_implementation<charT> > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT))
inline boost::std::shared_ptr<const cpp_regex_traits_implementation<charT> > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT))
{
cpp_regex_traits_base<charT> key(l);
return ::boost::object_cache<cpp_regex_traits_base<charT>, cpp_regex_traits_implementation<charT> >::get(key, 5);
@@ -935,9 +935,9 @@ public:
#ifndef BOOST_REGEX_BUGGY_CTYPE_FACET
typedef typename std::ctype<charT>::mask ctype_mask;
static const ctype_mask mask_base =
static const ctype_mask mask_base =
static_cast<ctype_mask>(
std::ctype<charT>::alnum
std::ctype<charT>::alnum
| std::ctype<charT>::alpha
| std::ctype<charT>::cntrl
| std::ctype<charT>::digit
@@ -949,7 +949,7 @@ public:
| std::ctype<charT>::upper
| std::ctype<charT>::xdigit);
if((f & mask_base)
if((f & mask_base)
&& (m_pimpl->m_pctype->is(
static_cast<ctype_mask>(f & mask_base), c)))
return true;
@@ -957,14 +957,14 @@ public:
return true;
else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_word) && (c == '_'))
return true;
else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_blank)
else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_blank)
&& m_pimpl->m_pctype->is(std::ctype<charT>::space, c)
&& !re_detail::is_separator(c))
return true;
else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_vertical)
else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_vertical)
&& (::boost::re_detail::is_separator(c) || (c == '\v')))
return true;
else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_horizontal)
else if((f & re_detail::cpp_regex_traits_implementation<charT>::mask_horizontal)
&& this->isctype(c, std::ctype<charT>::space) && !this->isctype(c, re_detail::cpp_regex_traits_implementation<charT>::mask_vertical))
return true;
return false;
@@ -1001,7 +1001,7 @@ public:
static std::string get_catalog_name();
private:
boost::shared_ptr<const re_detail::cpp_regex_traits_implementation<charT> > m_pimpl;
boost::std::shared_ptr<const re_detail::cpp_regex_traits_implementation<charT> > m_pimpl;
//
// catalog name handler:
//

View File

@@ -3,8 +3,8 @@
* Copyright (c) 1998-2009
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
@@ -47,14 +47,14 @@ class named_subexpressions;
template <class BidiIterator, class Allocator>
class match_results
{
{
private:
#ifndef BOOST_NO_STD_ALLOCATOR
typedef std::vector<sub_match<BidiIterator>, Allocator> vector_type;
#else
typedef std::vector<sub_match<BidiIterator> > vector_type;
#endif
public:
public:
typedef sub_match<BidiIterator> value_type;
#if !defined(BOOST_NO_STD_ALLOCATOR) && !(defined(BOOST_MSVC) && defined(_STLPORT_VERSION))
typedef typename Allocator::const_reference const_reference;
@@ -81,7 +81,7 @@ public:
: m_subs(), m_base(), m_last_closed_paren(0), m_is_singular(true) { (void)a; }
#endif
match_results(const match_results& m)
: m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular)
: m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular)
{
if(!m_is_singular)
{
@@ -547,7 +547,7 @@ public:
}
void BOOST_REGEX_CALL maybe_assign(const match_results<BidiIterator, Allocator>& m);
void BOOST_REGEX_CALL set_named_subs(boost::shared_ptr<named_sub_type> subs)
void BOOST_REGEX_CALL set_named_subs(boost::std::shared_ptr<named_sub_type> subs)
{
m_named_subs = subs;
}
@@ -566,7 +566,7 @@ private:
vector_type m_subs; // subexpressions
BidiIterator m_base; // where the search started from
sub_match<BidiIterator> m_null; // a null match
boost::shared_ptr<named_sub_type> m_named_subs; // Shared copy of named subs in the regex object
boost::std::shared_ptr<named_sub_type> m_named_subs; // Shared copy of named subs in the regex object
int m_last_closed_paren; // Last ) to be seen - used for formatting
bool m_is_singular; // True if our stored iterators are singular
};
@@ -586,7 +586,7 @@ void BOOST_REGEX_CALL match_results<BidiIterator, Allocator>::maybe_assign(const
// Distances are measured from the start of *this* match, unless this isn't
// a valid match in which case we use the start of the whole sequence. Note that
// no subsequent match-candidate can ever be to the left of the first match found.
// This ensures that when we are using bidirectional iterators, that distances
// This ensures that when we are using bidirectional iterators, that distances
// measured are as short as possible, and therefore as efficient as possible
// to compute. Finally note that we don't use the "matched" data member to test
// whether a sub-expression is a valid match, because partial matches set this

View File

@@ -3,8 +3,8 @@
* Copyright (c) 2003
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
@@ -19,7 +19,7 @@
#ifndef BOOST_REGEX_V4_REGEX_ITERATOR_HPP
#define BOOST_REGEX_V4_REGEX_ITERATOR_HPP
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
namespace boost{
@@ -34,10 +34,10 @@ namespace boost{
#pragma warning(pop)
#endif
template <class BidirectionalIterator,
template <class BidirectionalIterator,
class charT,
class traits>
class regex_iterator_implementation
class regex_iterator_implementation
{
typedef basic_regex<charT, traits> regex_type;
@@ -81,34 +81,34 @@ private:
regex_iterator_implementation& operator=(const regex_iterator_implementation&);
};
template <class BidirectionalIterator,
template <class BidirectionalIterator,
class charT = BOOST_DEDUCED_TYPENAME re_detail::regex_iterator_traits<BidirectionalIterator>::value_type,
class traits = regex_traits<charT> >
class regex_iterator
class regex_iterator
#ifndef BOOST_NO_STD_ITERATOR
: public std::iterator<
std::forward_iterator_tag,
std::forward_iterator_tag,
match_results<BidirectionalIterator>,
typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type,
const match_results<BidirectionalIterator>*,
const match_results<BidirectionalIterator>& >
const match_results<BidirectionalIterator>& >
#endif
{
private:
typedef regex_iterator_implementation<BidirectionalIterator, charT, traits> impl;
typedef shared_ptr<impl> pimpl;
typedef std::shared_ptr<impl> pimpl;
public:
typedef basic_regex<charT, traits> regex_type;
typedef match_results<BidirectionalIterator> value_type;
typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type
typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type
difference_type;
typedef const value_type* pointer;
typedef const value_type& reference;
typedef const value_type& reference;
typedef std::forward_iterator_tag iterator_category;
regex_iterator(){}
regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
const regex_type& re,
regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
const regex_type& re,
match_flag_type m = match_default)
: pdata(new impl(&re, b, m))
{
@@ -125,10 +125,10 @@ public:
return *this;
}
bool operator==(const regex_iterator& that)const
{
{
if((pdata.get() == 0) || (that.pdata.get() == 0))
return pdata.get() == that.pdata.get();
return pdata->compare(*(that.pdata.get()));
return pdata->compare(*(that.pdata.get()));
}
bool operator!=(const regex_iterator& that)const
{ return !(*this == that); }

View File

@@ -3,8 +3,8 @@
* Copyright (c) 2003
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
@@ -19,7 +19,7 @@
#ifndef BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
#define BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include <boost/detail/workaround.hpp>
#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
|| BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
@@ -27,7 +27,7 @@
//
// Borland C++ Builder 6, and Visual C++ 6,
// can't cope with the array template constructor
// so we have a template member that will accept any type as
// so we have a template member that will accept any type as
// argument, and then assert that is really is an array:
//
#include <boost/static_assert.hpp>
@@ -54,7 +54,7 @@ namespace boost{
template <class BidirectionalIterator,
class charT,
class traits>
class regex_token_iterator_implementation
class regex_token_iterator_implementation
{
typedef basic_regex<charT, traits> regex_type;
typedef sub_match<BidirectionalIterator> value_type;
@@ -125,11 +125,11 @@ public:
bool compare(const regex_token_iterator_implementation& that)
{
if(this == &that) return true;
return (&re.get_data() == &that.re.get_data())
&& (end == that.end)
&& (flags == that.flags)
&& (N == that.N)
&& (what[0].first == that.what[0].first)
return (&re.get_data() == &that.re.get_data())
&& (end == that.end)
&& (flags == that.flags)
&& (N == that.N)
&& (what[0].first == that.what[0].first)
&& (what[0].second == that.what[0].second);
}
const value_type& get()
@@ -167,40 +167,40 @@ private:
regex_token_iterator_implementation& operator=(const regex_token_iterator_implementation&);
};
template <class BidirectionalIterator,
template <class BidirectionalIterator,
class charT = BOOST_DEDUCED_TYPENAME re_detail::regex_iterator_traits<BidirectionalIterator>::value_type,
class traits = regex_traits<charT> >
class regex_token_iterator
class regex_token_iterator
#ifndef BOOST_NO_STD_ITERATOR
: public std::iterator<
std::forward_iterator_tag,
std::forward_iterator_tag,
sub_match<BidirectionalIterator>,
typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type,
const sub_match<BidirectionalIterator>*,
const sub_match<BidirectionalIterator>& >
const sub_match<BidirectionalIterator>& >
#endif
{
private:
typedef regex_token_iterator_implementation<BidirectionalIterator, charT, traits> impl;
typedef shared_ptr<impl> pimpl;
typedef std::shared_ptr<impl> pimpl;
public:
typedef basic_regex<charT, traits> regex_type;
typedef sub_match<BidirectionalIterator> value_type;
typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type
typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type
difference_type;
typedef const value_type* pointer;
typedef const value_type& reference;
typedef const value_type& reference;
typedef std::forward_iterator_tag iterator_category;
regex_token_iterator(){}
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
int submatch = 0, match_flag_type m = match_default)
: pdata(new impl(&re, b, submatch, m))
{
if(!pdata->init(a))
pdata.reset();
}
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
const std::vector<int>& submatches, match_flag_type m = match_default)
: pdata(new impl(&re, b, submatches, m))
{
@@ -239,10 +239,10 @@ public:
return *this;
}
bool operator==(const regex_token_iterator& that)const
{
{
if((pdata.get() == 0) || (that.pdata.get() == 0))
return pdata.get() == that.pdata.get();
return pdata->compare(*(that.pdata.get()));
return pdata->compare(*(that.pdata.get()));
}
bool operator!=(const regex_token_iterator& that)const
{ return !(*this == that); }

View File

@@ -3,8 +3,8 @@
* Copyright (c) 1998-2005
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
@@ -40,7 +40,7 @@
#include <boost/throw_exception.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_array.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include <boost/mpl/bool_fwd.hpp>
#ifndef BOOST_NO_STD_LOCALE
# include <locale>
@@ -128,13 +128,13 @@ namespace boost{ namespace re_detail{
//
// MSVC 8 will either emit warnings or else refuse to compile
// code that makes perfectly legitimate use of std::copy, when
// the OutputIterator type is a user-defined class (apparently all user
// the OutputIterator type is a user-defined class (apparently all user
// defined iterators are "unsafe"). This code works around that:
//
template<class InputIterator, class OutputIterator>
inline OutputIterator copy(
InputIterator first,
InputIterator last,
InputIterator first,
InputIterator last,
OutputIterator dest
)
{
@@ -142,8 +142,8 @@ namespace boost{ namespace re_detail{
}
template<class InputIterator1, class InputIterator2>
inline bool equal(
InputIterator1 first,
InputIterator1 last,
InputIterator1 first,
InputIterator1 last,
InputIterator2 with
)
{
@@ -153,15 +153,15 @@ namespace boost{ namespace re_detail{
//
// MSVC 10 will either emit warnings or else refuse to compile
// code that makes perfectly legitimate use of std::copy, when
// the OutputIterator type is a user-defined class (apparently all user
// the OutputIterator type is a user-defined class (apparently all user
// defined iterators are "unsafe"). What's more Microsoft have removed their
// non-standard "unchecked" versions, even though their still in the MS
// documentation!! Work around this as best we can:
// documentation!! Work around this as best we can:
//
template<class InputIterator, class OutputIterator>
inline OutputIterator copy(
InputIterator first,
InputIterator last,
InputIterator first,
InputIterator last,
OutputIterator dest
)
{
@@ -171,8 +171,8 @@ namespace boost{ namespace re_detail{
}
template<class InputIterator1, class InputIterator2>
inline bool equal(
InputIterator1 first,
InputIterator1 last,
InputIterator1 first,
InputIterator1 last,
InputIterator2 with
)
{
@@ -180,11 +180,11 @@ namespace boost{ namespace re_detail{
if(*first++ != *with++) return false;
return true;
}
#else
using std::copy;
using std::equal;
#endif
#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__
#else
using std::copy;
using std::equal;
#endif
#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__
// use safe versions of strcpy etc:
using ::strcpy_s;
@@ -193,7 +193,7 @@ namespace boost{ namespace re_detail{
inline std::size_t strcpy_s(
char *strDestination,
std::size_t sizeInBytes,
const char *strSource
const char *strSource
)
{
if(std::strlen(strSource)+1 > sizeInBytes)
@@ -204,7 +204,7 @@ namespace boost{ namespace re_detail{
inline std::size_t strcat_s(
char *strDestination,
std::size_t sizeInBytes,
const char *strSource
const char *strSource
)
{
if(std::strlen(strSource) + std::strlen(strDestination) + 1 > sizeInBytes)

View File

@@ -3,8 +3,8 @@
* Copyright (c) 2003
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
@@ -26,7 +26,7 @@ namespace boost{
#endif
template <class BidirectionalIterator>
class u32regex_iterator_implementation
class u32regex_iterator_implementation
{
typedef u32regex regex_type;
@@ -71,31 +71,31 @@ private:
};
template <class BidirectionalIterator>
class u32regex_iterator
class u32regex_iterator
#ifndef BOOST_NO_STD_ITERATOR
: public std::iterator<
std::forward_iterator_tag,
std::forward_iterator_tag,
match_results<BidirectionalIterator>,
typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type,
const match_results<BidirectionalIterator>*,
const match_results<BidirectionalIterator>& >
const match_results<BidirectionalIterator>& >
#endif
{
private:
typedef u32regex_iterator_implementation<BidirectionalIterator> impl;
typedef shared_ptr<impl> pimpl;
typedef std::shared_ptr<impl> pimpl;
public:
typedef u32regex regex_type;
typedef match_results<BidirectionalIterator> value_type;
typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type
typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type
difference_type;
typedef const value_type* pointer;
typedef const value_type& reference;
typedef const value_type& reference;
typedef std::forward_iterator_tag iterator_category;
u32regex_iterator(){}
u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
const regex_type& re,
u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
const regex_type& re,
match_flag_type m = match_default)
: pdata(new impl(&re, b, m))
{
@@ -112,10 +112,10 @@ public:
return *this;
}
bool operator==(const u32regex_iterator& that)const
{
{
if((pdata.get() == 0) || (that.pdata.get() == 0))
return pdata.get() == that.pdata.get();
return pdata->compare(*(that.pdata.get()));
return pdata->compare(*(that.pdata.get()));
}
bool operator!=(const u32regex_iterator& that)const
{ return !(*this == that); }

View File

@@ -3,8 +3,8 @@
* Copyright (c) 2003
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
@@ -25,7 +25,7 @@
//
// Borland C++ Builder 6, and Visual C++ 6,
// can't cope with the array template constructor
// so we have a template member that will accept any type as
// so we have a template member that will accept any type as
// argument, and then assert that is really is an array:
//
#include <boost/static_assert.hpp>
@@ -43,7 +43,7 @@ namespace boost{
#endif
template <class BidirectionalIterator>
class u32regex_token_iterator_implementation
class u32regex_token_iterator_implementation
{
typedef u32regex regex_type;
typedef sub_match<BidirectionalIterator> value_type;
@@ -115,11 +115,11 @@ public:
bool compare(const u32regex_token_iterator_implementation& that)
{
if(this == &that) return true;
return (&re.get_data() == &that.re.get_data())
&& (end == that.end)
&& (flags == that.flags)
&& (N == that.N)
&& (what[0].first == that.what[0].first)
return (&re.get_data() == &that.re.get_data())
&& (end == that.end)
&& (flags == that.flags)
&& (N == that.N)
&& (what[0].first == that.what[0].first)
&& (what[0].second == that.what[0].second);
}
const value_type& get()
@@ -158,37 +158,37 @@ private:
};
template <class BidirectionalIterator>
class u32regex_token_iterator
class u32regex_token_iterator
#ifndef BOOST_NO_STD_ITERATOR
: public std::iterator<
std::forward_iterator_tag,
std::forward_iterator_tag,
sub_match<BidirectionalIterator>,
typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type,
const sub_match<BidirectionalIterator>*,
const sub_match<BidirectionalIterator>& >
const sub_match<BidirectionalIterator>& >
#endif
{
private:
typedef u32regex_token_iterator_implementation<BidirectionalIterator> impl;
typedef shared_ptr<impl> pimpl;
typedef std::shared_ptr<impl> pimpl;
public:
typedef u32regex regex_type;
typedef sub_match<BidirectionalIterator> value_type;
typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type
typedef typename re_detail::regex_iterator_traits<BidirectionalIterator>::difference_type
difference_type;
typedef const value_type* pointer;
typedef const value_type& reference;
typedef const value_type& reference;
typedef std::forward_iterator_tag iterator_category;
u32regex_token_iterator(){}
u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
int submatch = 0, match_flag_type m = match_default)
: pdata(new impl(&re, b, submatch, m))
{
if(!pdata->init(a))
pdata.reset();
}
u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
const std::vector<int>& submatches, match_flag_type m = match_default)
: pdata(new impl(&re, b, submatches, m))
{
@@ -227,10 +227,10 @@ public:
return *this;
}
bool operator==(const u32regex_token_iterator& that)const
{
{
if((pdata.get() == 0) || (that.pdata.get() == 0))
return pdata.get() == that.pdata.get();
return pdata->compare(*(that.pdata.get()));
return pdata->compare(*(that.pdata.get()));
}
bool operator!=(const u32regex_token_iterator& that)const
{ return !(*this == that); }

View File

@@ -3,12 +3,12 @@
* Copyright (c) 2004
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE w32_regex_traits.hpp
@@ -52,21 +52,21 @@
#pragma warning(disable:4800)
#endif
namespace boost{
namespace boost{
//
// forward declaration is needed by some compilers:
//
template <class charT>
class w32_regex_traits;
namespace re_detail{
//
// start by typedeffing the types we'll need:
//
typedef ::boost::uint32_t lcid_type; // placeholder for LCID.
typedef ::boost::shared_ptr<void> cat_type; // placeholder for dll HANDLE.
typedef ::boost::std::shared_ptr<void> cat_type; // placeholder for dll HANDLE.
//
// then add wrappers around the actual Win32 API's (ie implementation hiding):
@@ -186,7 +186,7 @@ private:
};
template <class charT>
w32_regex_traits_char_layer<charT>::w32_regex_traits_char_layer(::boost::re_detail::lcid_type l)
w32_regex_traits_char_layer<charT>::w32_regex_traits_char_layer(::boost::re_detail::lcid_type l)
: w32_regex_traits_base<charT>(l)
{
// we need to start by initialising our syntax map so we know which
@@ -232,7 +232,7 @@ w32_regex_traits_char_layer<charT>::w32_regex_traits_char_layer(::boost::re_deta
}
template <class charT>
typename w32_regex_traits_char_layer<charT>::string_type
typename w32_regex_traits_char_layer<charT>::string_type
w32_regex_traits_char_layer<charT>::get_default_message(regex_constants::syntax_type i)
{
const char* ptr = get_default_syntax(i);
@@ -342,7 +342,7 @@ private:
};
template <class charT>
typename w32_regex_traits_implementation<charT>::string_type
typename w32_regex_traits_implementation<charT>::string_type
w32_regex_traits_implementation<charT>::transform_primary(const charT* p1, const charT* p2) const
{
string_type result;
@@ -388,7 +388,7 @@ typename w32_regex_traits_implementation<charT>::string_type
}
template <class charT>
typename w32_regex_traits_implementation<charT>::string_type
typename w32_regex_traits_implementation<charT>::string_type
w32_regex_traits_implementation<charT>::lookup_collatename(const charT* p1, const charT* p2) const
{
typedef typename std::map<string_type, string_type>::const_iterator iter_type;
@@ -455,8 +455,8 @@ w32_regex_traits_implementation<charT>::w32_regex_traits_implementation(::boost:
//
// Error messages:
//
for(boost::regex_constants::error_type i = static_cast<boost::regex_constants::error_type>(0);
i <= boost::regex_constants::error_unknown;
for(boost::regex_constants::error_type i = static_cast<boost::regex_constants::error_type>(0);
i <= boost::regex_constants::error_unknown;
i = static_cast<boost::regex_constants::error_type>(i + 1))
{
const char* p = get_default_error_string(i);
@@ -477,7 +477,7 @@ w32_regex_traits_implementation<charT>::w32_regex_traits_implementation(::boost:
//
// Custom class names:
//
static const char_class_type masks[14] =
static const char_class_type masks[14] =
{
0x0104u, // C1_ALPHA | C1_DIGIT
0x0100u, // C1_ALPHA
@@ -509,10 +509,10 @@ w32_regex_traits_implementation<charT>::w32_regex_traits_implementation(::boost:
}
template <class charT>
typename w32_regex_traits_implementation<charT>::char_class_type
typename w32_regex_traits_implementation<charT>::char_class_type
w32_regex_traits_implementation<charT>::lookup_classname_imp(const charT* p1, const charT* p2) const
{
static const char_class_type masks[22] =
static const char_class_type masks[22] =
{
0,
0x0104u, // C1_ALPHA | C1_DIGIT
@@ -522,7 +522,7 @@ typename w32_regex_traits_implementation<charT>::char_class_type
0x0004u, // C1_DIGIT
0x0004u, // C1_DIGIT
(~(0x0020u|0x0008u|0x0040) & 0x01ffu) | 0x0400u, // not C1_CNTRL or C1_SPACE or C1_BLANK
w32_regex_traits_implementation<charT>::mask_horizontal,
w32_regex_traits_implementation<charT>::mask_horizontal,
0x0002u, // C1_LOWER
0x0002u, // C1_LOWER
(~0x0020u & 0x01ffu) | 0x0400, // not C1_CNTRL
@@ -532,9 +532,9 @@ typename w32_regex_traits_implementation<charT>::char_class_type
0x0001u, // C1_UPPER
w32_regex_traits_implementation<charT>::mask_unicode,
0x0001u, // C1_UPPER
w32_regex_traits_implementation<charT>::mask_vertical,
0x0104u | w32_regex_traits_implementation<charT>::mask_word,
0x0104u | w32_regex_traits_implementation<charT>::mask_word,
w32_regex_traits_implementation<charT>::mask_vertical,
0x0104u | w32_regex_traits_implementation<charT>::mask_word,
0x0104u | w32_regex_traits_implementation<charT>::mask_word,
0x0080u, // C1_XDIGIT
};
if(m_custom_class_names.size())
@@ -552,7 +552,7 @@ typename w32_regex_traits_implementation<charT>::char_class_type
template <class charT>
boost::shared_ptr<const w32_regex_traits_implementation<charT> > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT))
boost::std::shared_ptr<const w32_regex_traits_implementation<charT> > 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<charT> >::get(l, 5);
@@ -625,7 +625,7 @@ public:
}
bool isctype(charT c, char_class_type f) const
{
if((f & re_detail::w32_regex_traits_implementation<charT>::mask_base)
if((f & re_detail::w32_regex_traits_implementation<charT>::mask_base)
&& (this->m_pimpl->isctype(f & re_detail::w32_regex_traits_implementation<charT>::mask_base, c)))
return true;
else if((f & re_detail::w32_regex_traits_implementation<charT>::mask_unicode) && re_detail::is_extended(c))
@@ -635,7 +635,7 @@ public:
else if((f & re_detail::w32_regex_traits_implementation<charT>::mask_vertical)
&& (::boost::re_detail::is_separator(c) || (c == '\v')))
return true;
else if((f & re_detail::w32_regex_traits_implementation<charT>::mask_horizontal)
else if((f & re_detail::w32_regex_traits_implementation<charT>::mask_horizontal)
&& this->isctype(c, 0x0008u) && !this->isctype(c, re_detail::w32_regex_traits_implementation<charT>::mask_vertical))
return true;
return false;
@@ -672,7 +672,7 @@ public:
static std::string get_catalog_name();
private:
boost::shared_ptr<const re_detail::w32_regex_traits_implementation<charT> > m_pimpl;
boost::std::shared_ptr<const re_detail::w32_regex_traits_implementation<charT> > m_pimpl;
//
// catalog name handler:
//