From 13610caa36edcae896f59246a2933ef4772690f4 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Sat, 28 Mar 2015 12:02:41 -0700 Subject: [PATCH] Update copyright notice; change to_string to avoid UB by calling a different constructor. Fixes #11150 --- include/boost/utility/string_ref.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/utility/string_ref.hpp b/include/boost/utility/string_ref.hpp index 9018513..8707157 100644 --- a/include/boost/utility/string_ref.hpp +++ b/include/boost/utility/string_ref.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) Marshall Clow 2012-2012. + Copyright (c) Marshall Clow 2012-2015. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -82,12 +82,12 @@ namespace boost { #ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS template explicit operator std::basic_string() const { - return std::basic_string ( ptr_, len_ ); + return std::basic_string ( begin(), end()); } #endif std::basic_string to_string () const { - return std::basic_string ( ptr_, len_ ); + return std::basic_string ( begin(), end()); } // iterators