[PATCH] libstdc++: Use specific feature test macro for #if in <string>
Tomasz Kaminski
tkaminsk@redhat.com
Tue Mar 10 07:44:09 GMT 2026
On Mon, Mar 9, 2026 at 5:47 PM Jonathan Wakely <jwakely@redhat.com> wrote:
> libstdc++-v3/ChangeLog:
>
> * include/bits/basic_string.h: Check __glibcxx_to_string instead
> of __cplusplus.
> ---
>
> Tested x86_64-linux.
>
LGTM
>
> libstdc++-v3/include/bits/basic_string.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/libstdc++-v3/include/bits/basic_string.h
> b/libstdc++-v3/include/bits/basic_string.h
> index 9bbe16507d00..202a911f9ef3 100644
> --- a/libstdc++-v3/include/bits/basic_string.h
> +++ b/libstdc++-v3/include/bits/basic_string.h
> @@ -56,11 +56,10 @@
> # include <bits/ranges_util.h> // ranges::subrange
> #endif
>
> -#if __cplusplus > 202302L
> +#if __glibcxx_to_string >= 202306L // C++ >= 26
> # include <charconv>
> #endif
>
> -
> #if ! _GLIBCXX_USE_CXX11_ABI
> # include "cow_string.h"
> #else
> --
> 2.53.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20260310/79e35937/attachment.htm>
More information about the Libstdc++
mailing list