From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 34A1A3851C25; Wed, 8 Jun 2022 15:52:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34A1A3851C25 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-8463] libstdc++: Only include for COW string X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: c45a9752f15bbc37d8efda0e29af5a2bfd53729d X-Git-Newrev: 64f5d58d8151324be111ba6e13c50b4b642c41c2 Message-Id: <20220608155253.34A1A3851C25@sourceware.org> Date: Wed, 8 Jun 2022 15:52:53 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2022 15:52:53 -0000 https://gcc.gnu.org/g:64f5d58d8151324be111ba6e13c50b4b642c41c2 commit r12-8463-g64f5d58d8151324be111ba6e13c50b4b642c41c2 Author: Jonathan Wakely Date: Thu May 19 12:54:41 2022 +0100 libstdc++: Only include for COW string Since the COW std::string was moved to its own header, we don't need the atomic dispatch helpers in the definition of std::__cxx11::string. Move the inclusion of the header to where it's needed. libstdc++-v3/ChangeLog: * include/bits/basic_string.h: Do not include here. * include/bits/cow_string.h: Include it here. (cherry picked from commit f3e22baec0290c23654e99bf184153765944f4aa) Diff: --- libstdc++-v3/include/bits/basic_string.h | 1 - libstdc++-v3/include/bits/cow_string.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index c3fbc53953c..6041d05815b 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -36,7 +36,6 @@ #pragma GCC system_header -#include #include #include diff --git a/libstdc++-v3/include/bits/cow_string.h b/libstdc++-v3/include/bits/cow_string.h index a49a5b04f2f..7bceb06a79b 100644 --- a/libstdc++-v3/include/bits/cow_string.h +++ b/libstdc++-v3/include/bits/cow_string.h @@ -34,6 +34,8 @@ #if ! _GLIBCXX_USE_CXX11_ABI +#include // _Atomic_word, __is_single_threaded + #ifdef __cpp_lib_is_constant_evaluated // Support P1032R1 in C++20 (but not P0980R1 for COW strings). # define __cpp_lib_constexpr_string 201811L