mirror of
https://github.com/boostorg/regex.git
synced 2025-07-20 07:42:07 +02:00
Fix numerous VC-10 compiler warnings.
Rewrite ICU configuration to use the new Boost.Build configuration logic. [SVN r61893]
This commit is contained in:
@ -27,6 +27,10 @@
|
||||
#include <boost/mpl/int_fwd.hpp>
|
||||
#include <bitset>
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable: 4251)
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
@ -1015,6 +1019,10 @@ inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QU
|
||||
|
||||
} // namespace boost.
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
#include <boost/regex/v4/u32regex_iterator.hpp>
|
||||
#include <boost/regex/v4/u32regex_token_iterator.hpp>
|
||||
|
||||
|
@ -149,7 +149,37 @@ namespace boost{ namespace re_detail{
|
||||
{
|
||||
return stdext::unchecked_equal(first, last, with);
|
||||
}
|
||||
|
||||
#elif BOOST_WORKAROUND(BOOST_MSVC, > 1500)
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
//
|
||||
template<class InputIterator, class OutputIterator>
|
||||
inline OutputIterator copy(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
OutputIterator dest
|
||||
)
|
||||
{
|
||||
while(first != last)
|
||||
*dest++ = *first++;
|
||||
return dest;
|
||||
}
|
||||
template<class InputIterator1, class InputIterator2>
|
||||
inline bool equal(
|
||||
InputIterator1 first,
|
||||
InputIterator1 last,
|
||||
InputIterator2 with
|
||||
)
|
||||
{
|
||||
while(first != last)
|
||||
if(*first++ != *with++) return false;
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
using std::copy;
|
||||
using std::equal;
|
||||
|
@ -292,7 +292,7 @@ template <class charT, class Traits, class Alloc>
|
||||
inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
|
||||
{
|
||||
typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
|
||||
return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, m);
|
||||
return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, submatch, m);
|
||||
}
|
||||
inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
|
||||
{
|
||||
|
Reference in New Issue
Block a user