From 54965f567dc899a4ee2b8eb8be8b8b5563a65315 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 9 Oct 2021 19:50:15 +0300 Subject: [PATCH] Add an allocator argument to operator string() --- include/boost/core/string_view.hpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/include/boost/core/string_view.hpp b/include/boost/core/string_view.hpp index 2aae97b..4272b69 100644 --- a/include/boost/core/string_view.hpp +++ b/include/boost/core/string_view.hpp @@ -383,23 +383,11 @@ public: // conversions -#if !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) - - template >::type> - operator std::basic_string() const + template operator std::basic_string, A>() const { - return std::basic_string( data(), size() ); + return std::basic_string, A>( data(), size() ); } -#else - - operator std::basic_string() const - { - return std::basic_string( data(), size() ); - } - -#endif - #if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) template >::type>