From 79ae525967284ea239d4a1bc0647ad95a39ff1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Thu, 14 Nov 2019 15:25:22 +0100 Subject: [PATCH] Fixes #133 ("basic_string move constructor with allocator argument has incorrect allocator check") --- doc/container.qbk | 2 +- include/boost/container/string.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/container.qbk b/doc/container.qbk index 95d58ee..68324ab 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -1323,7 +1323,7 @@ use [*Boost.Container]? There are several reasons for that: * Fixed bugs: * [@https://github.com/boostorg/container/issues/132 GitHub #132: ['"flat_map::lower_bound and upper_bound have wrong/misleading docs"]]. - + * [@https://github.com/boostorg/container/issues/133 GitHub #133: ['"basic_string move constructor with allocator argument has incorrect allocator check"]]. [endsect] diff --git a/include/boost/container/string.hpp b/include/boost/container/string.hpp index 46ca567..516b701 100644 --- a/include/boost/container/string.hpp +++ b/include/boost/container/string.hpp @@ -712,7 +712,7 @@ class basic_string : base_t(a) { this->priv_terminate_string(); - if(a == this->alloc()){ + if(s.alloc() == this->alloc()){ this->swap_data(s); } else{