[PATCH] libstdc++: Use specific feature test macro for #if in <string>

François Dumont frs.dumont@gmail.com
Wed May 6 17:05:27 GMT 2026


On 3/9/26 17:46, Jonathan Wakely wrote:
> libstdc++-v3/ChangeLog:
>
> 	* include/bits/basic_string.h: Check __glibcxx_to_string instead
> 	of __cplusplus.
> ---
>
> Tested x86_64-linux.
>
>   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

Shouldn't it be:

#if __glibcxx_to_string // C++ >= 23

Even if it's not a big deal.



More information about the Libstdc++ mailing list