From 6c181b02ba52ae63ddd4d2037a7a6a6061c8f7d9 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 10 Jun 2011 17:17:14 +0000 Subject: [PATCH] Add some typecasts to prevent copying a buffer twice (makes sure we find the correct overload of assign). [SVN r72541] --- include/boost/regex/v4/basic_regex.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/regex/v4/basic_regex.hpp b/include/boost/regex/v4/basic_regex.hpp index 53b7bcaa..1e71877e 100644 --- a/include/boost/regex/v4/basic_regex.hpp +++ b/include/boost/regex/v4/basic_regex.hpp @@ -398,7 +398,7 @@ public: 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(&*a.begin()), static_cast(&*a.begin() + a.size()), f); else assign(static_cast(0), static_cast(0), f); }