On Wed, 28 Aug 2024 at 06:47, Dhruv Chawla <dhr...@nvidia.com> wrote:
>
> version.syn#2 requires <string> to define
> __cpp_lib_allocator_traits_is_always_equal.
>
> The attached patch therefore defines the
> __glibcxx_want_allocator_traits_is_always_equal macro to get the
> definition of the feature-test macro from <bits/version.h>.
>
> This is not isolated only to <string> though. The standard requires the
> following (as per version.syn#2):
>
> #define __cpp_lib_allocator_traits_is_always_equal  201411L
>    // freestanding, also in <memory>, <scoped_allocator>, <string>, <deque>,
>    // <forward_list>, <list>, <vector>, <map>, <set>, <unordered_map>,
>    // <unordered_set>
>
> After fixing <string>, all the above headers except <memory> still fail to
> define the macro. Should similar fixes be created for these headers as well?

Yes please, this is a regression since GCC 13. It was previously
defined in <bits/alloc_traits.h> which is included by all the headers
above. In GCC 14 we changed how we define feature test macros, and we
accidentally stopped defining it in all those headers.

>
> Signed-off-by: Dhruv Chawla <dhr...@nvidia.com>
>
> --
> Regards,
> Dhruv

Reply via email to