summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/regex/v4/regex_workaround.hpp')
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/regex_workaround.hpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/3rdParty/Boost/src/boost/regex/v4/regex_workaround.hpp b/3rdParty/Boost/src/boost/regex/v4/regex_workaround.hpp
index 06527f1..46a8a8d 100644
--- a/3rdParty/Boost/src/boost/regex/v4/regex_workaround.hpp
+++ b/3rdParty/Boost/src/boost/regex/v4/regex_workaround.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;