From 45891854d99ede69f404f7fcf39de7a7ce936c03 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 11 Dec 2007 17:29:58 +0000 Subject: [PATCH] Merged fixes for #1471 (warning suppression). [SVN r41974] --- include/boost/regex/v4/cpp_regex_traits.hpp | 2 +- include/boost/regex/v4/regex_workaround.hpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/boost/regex/v4/cpp_regex_traits.hpp b/include/boost/regex/v4/cpp_regex_traits.hpp index dbec293c..ddcbef43 100644 --- a/include/boost/regex/v4/cpp_regex_traits.hpp +++ b/include/boost/regex/v4/cpp_regex_traits.hpp @@ -128,7 +128,7 @@ parser_buf::seekoff(off_type off, ::std::ios_base::seekdir way, : break; case ::std::ios_base::cur: { - std::ptrdiff_t newpos = pos + off; + std::ptrdiff_t newpos = static_cast(pos + off); if((newpos < 0) || (newpos > size)) return pos_type(off_type(-1)); else diff --git a/include/boost/regex/v4/regex_workaround.hpp b/include/boost/regex/v4/regex_workaround.hpp index 917320ca..fc3c2123 100644 --- a/include/boost/regex/v4/regex_workaround.hpp +++ b/include/boost/regex/v4/regex_workaround.hpp @@ -150,13 +150,16 @@ namespace boost{ namespace re_detail{ return stdext::unchecked_equal(first, last, with); } +#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; using ::strcat_s; #else - using std::copy; - using std::equal; - inline std::size_t strcpy_s( char *strDestination, std::size_t sizeInBytes,