|
Boost-Commit : |
From: john_at_[hidden]
Date: 2007-12-11 12:28:15
Author: johnmaddock
Date: 2007-12-11 12:28:15 EST (Tue, 11 Dec 2007)
New Revision: 41973
URL: http://svn.boost.org/trac/boost/changeset/41973
Log:
Fixes #1471.
Text files modified:
trunk/boost/regex/v4/cpp_regex_traits.hpp | 2 +-
trunk/boost/regex/v4/regex_workaround.hpp | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
Modified: trunk/boost/regex/v4/cpp_regex_traits.hpp
==============================================================================
--- trunk/boost/regex/v4/cpp_regex_traits.hpp (original)
+++ trunk/boost/regex/v4/cpp_regex_traits.hpp 2007-12-11 12:28:15 EST (Tue, 11 Dec 2007)
@@ -128,7 +128,7 @@
break;
case ::std::ios_base::cur:
{
- std::ptrdiff_t newpos = pos + off;
+ std::ptrdiff_t newpos = static_cast<std::ptrdiff_t>(pos + off);
if((newpos < 0) || (newpos > size))
return pos_type(off_type(-1));
else
Modified: trunk/boost/regex/v4/regex_workaround.hpp
==============================================================================
--- trunk/boost/regex/v4/regex_workaround.hpp (original)
+++ trunk/boost/regex/v4/regex_workaround.hpp 2007-12-11 12:28:15 EST (Tue, 11 Dec 2007)
@@ -150,13 +150,16 @@
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,
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk