Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72541 - trunk/boost/regex/v4
From: john_at_[hidden]
Date: 2011-06-10 13:17:14


Author: johnmaddock
Date: 2011-06-10 13:17:14 EDT (Fri, 10 Jun 2011)
New Revision: 72541
URL: http://svn.boost.org/trac/boost/changeset/72541

Log:
Add some typecasts to prevent copying a buffer twice (makes sure we find the correct overload of assign).
Text files modified:
   trunk/boost/regex/v4/basic_regex.hpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/boost/regex/v4/basic_regex.hpp
==============================================================================
--- trunk/boost/regex/v4/basic_regex.hpp (original)
+++ trunk/boost/regex/v4/basic_regex.hpp 2011-06-10 13:17:14 EDT (Fri, 10 Jun 2011)
@@ -398,7 +398,7 @@
       typedef typename traits::string_type seq_type;
       seq_type a(arg_first, arg_last);
       if(a.size())
- assign(&*a.begin(), &*a.begin() + a.size(), f);
+ assign(static_cast<const charT*>(&*a.begin()), static_cast<const charT*>(&*a.begin() + a.size()), f);
       else
          assign(static_cast<const charT*>(0), static_cast<const charT*>(0), f);
    }


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