Created on 2022-09-17.00:00:00 last changed 12 months ago
Proposed resolution:
This wording is relative to N4917.
Modify [support.c.headers.other] as indicated:
-1- Every C header other than <complex.h> ([complex.h.syn]), <iso646.h> ([iso646.h.syn]), <stdalign.h> ([stdalign.h.syn]), <stdatomic.h> ([stdatomic.h.syn]), <stdbool.h> ([stdbool.h.syn]), and <tgmath.h> ([tgmath.h.syn]), each of which has a name of the form <name.h>, behaves as if each name placed in the standard library namespace by the corresponding <cname> header is placed within the global namespace scope, except for the functions described in [sf.cmath], the std::lerp function overloads ([c.math.lerp]), the declaration of std::byte ([cstddef.syn]), and the functions and function templates described in [support.types.byteops]. […]
[ 2022-11-12 Approved at November 2022 meeting in Kona. Status changed: Voting → WP. ]
[ 2022-10-12; Reflector poll ]
Set status to Tentatively Ready after six votes in favour during reflector poll.
According to [support.c.headers.other]/1, <math.h> is required to provide ::lerp, despite that it is a C++-only component. In P0811R3, neither <math.h> nor C compatibility is mentioned, so it seems unintended not to list lerp as an exception in [support.c.headers.other].
Currently there is implementation divergence: libstdc++ provide ::lerp in <math.h> but not in <cmath>, while MSVC STL and libc++ don't provide ::lerp in <math.h> or <cmath> at all. I'm not sure whether this should be considered together with LWG 3484. Since nullptr_t has become a part of the C standard library as of C23 (see WG14-N3042 and WG14-N3048), I believe we should keep providing ::nullptr_t in <stddef.h>.History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2022-11-17 00:42:33 | admin | set | messages: + msg13079 |
2022-11-17 00:42:33 | admin | set | status: voting -> wp |
2022-11-08 03:46:49 | admin | set | status: ready -> voting |
2022-10-12 14:38:10 | admin | set | messages: + msg12854 |
2022-10-12 14:38:10 | admin | set | status: new -> ready |
2022-09-17 17:50:50 | admin | set | messages: + msg12777 |
2022-09-17 00:00:00 | admin | create |