1) Disabled recursive implementation for VC8: stack overflows can't be reliably detected unless the whole program is compiled with asynchronous exceptions.

2) Changed std::copy calls on VC8 to avoid "dangerous code" warnings.
3) Moved backreference and octal escape code into line with POSIX-extended requirements.
4) Changed match_results leftmost-longest rules to stop unnecessary std::distance computations (an optimisation for non-random access iterators).
5) Changed C lib calls to use "safe" versions of string API's where available.
6) Added many new POSIX-extended leftmost-longest tests, to verify the above.


[SVN r27880]
This commit is contained in:
John Maddock
2005-03-30 11:38:51 +00:00
parent ca144bb2b3
commit de28eb9b18
17 changed files with 361 additions and 106 deletions

View File

@ -231,7 +231,7 @@ BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_transform(lcid_type id, const
id, // locale identifier
LCMAP_SORTKEY, // mapping transformation type
p1, // source string
p2 - p1, // number of characters in source string
static_cast<int>(p2 - p1), // number of characters in source string
0, // destination buffer
0 // size of destination buffer
);
@ -242,7 +242,7 @@ BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_transform(lcid_type id, const
id, // locale identifier
LCMAP_SORTKEY, // mapping transformation type
p1, // source string
p2 - p1, // number of characters in source string
static_cast<int>(p2 - p1), // number of characters in source string
&*result.begin(), // destination buffer
bytes // size of destination buffer
);
@ -262,7 +262,7 @@ BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_transform(lcid_type id, const
id, // locale identifier
LCMAP_SORTKEY, // mapping transformation type
p1, // source string
p2 - p1, // number of characters in source string
static_cast<int>(p2 - p1), // number of characters in source string
0, // destination buffer
0 // size of destination buffer
);
@ -273,7 +273,7 @@ BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_transform(lcid_type id, const
id, // locale identifier
LCMAP_SORTKEY, // mapping transformation type
p1, // source string
p2 - p1, // number of characters in source string
static_cast<int>(p2 - p1), // number of characters in source string
reinterpret_cast<wchar_t*>(&*result.begin()), // destination buffer *of bytes*
bytes // size of destination buffer
);
@ -295,7 +295,7 @@ BOOST_REGEX_DECL std::basic_string<unsigned short> BOOST_REGEX_CALL w32_transfor
id, // locale identifier
LCMAP_SORTKEY, // mapping transformation type
(LPCWSTR)p1, // source string
p2 - p1, // number of characters in source string
static_cast<int>(p2 - p1), // number of characters in source string
0, // destination buffer
0 // size of destination buffer
);
@ -306,7 +306,7 @@ BOOST_REGEX_DECL std::basic_string<unsigned short> BOOST_REGEX_CALL w32_transfor
id, // locale identifier
LCMAP_SORTKEY, // mapping transformation type
(LPCWSTR)p1, // source string
p2 - p1, // number of characters in source string
static_cast<int>(p2 - p1), // number of characters in source string
reinterpret_cast<wchar_t*>(&*result.begin()), // destination buffer *of bytes*
bytes // size of destination buffer
);