From: Jonathan Wakely Date: Thu, 19 May 2022 11:54:41 +0000 (+0100) Subject: libstdc++: Only include for COW string X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64f5d58d8151324be111ba6e13c50b4b642c41c2;p=test_jj.git 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 --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index c3fbc53..6041d05 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 a49a5b0..7bceb06 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