This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++23 status.

3437. __cpp_lib_polymorphic_allocator is in the wrong header

Section: 17.3.2 [version.syn] Status: C++23 Submitter: Jonathan Wakely Opened: 2020-04-29 Last modified: 2023-11-22

Priority: 0

View other active issues in [version.syn].

View all other issues in [version.syn].

View all issues with C++23 status.

Discussion:

17.3.2 [version.syn] says that __cpp_lib_polymorphic_allocator is also defined in <memory>, but std::polymorphic_allocator is defined in <memory_resource>. This seems like an error in P1902R1. The macro should be in the same header as the feature it relates to.

[2020-05-09; Reflector prioritization]

Set status to Tentatively Ready after six votes in favour during reflector discussions.

[2020-11-09 Approved In November virtual meeting. Status changed: Tentatively Ready → WP.]

Proposed resolution:

This wording is relative to N4861.

  1. Modify 17.3.2 [version.syn] as indicated:

    […]
    #define __cpp_lib_parallel_algorithm    201603L // also in <algorithm>, <numeric>
    #define __cpp_lib_polymorphic_allocator 201902L // also in <memorymemory_resource>
    #define __cpp_lib_quoted_string_io      201304L // also in <iomanip>
    […]