Date: Fri, 21 Mar 2025 10:05:59 -0700
On Friday, 21 March 2025 01:43:19 Pacific Daylight Time Hans Ã…berg via Std-
Proposals wrote:
> No, please consult the example I gave upthread. Macros could be used, but
> they are not in general sufficiently fine-grained and must be looked up
> case by case.
The buildsystem is fine-grained enough.
Let me give an example that is similar to the 128-bit modulus function: 128-
bit atomics. On quite a lot of platforms, you must link to libatomic for those
to work. You don't need to provide your own implementation, all you want to
know is whether you need an extra -l switch to your linker. That's not
something you could do with #if or a C++ language construct.
[Admittedly, this is something compiler & Standard Library vendors should fix
so the use of 128-bit atomic causes the linker to automatically pull in
libatomic]
Proposals wrote:
> No, please consult the example I gave upthread. Macros could be used, but
> they are not in general sufficiently fine-grained and must be looked up
> case by case.
The buildsystem is fine-grained enough.
Let me give an example that is similar to the 128-bit modulus function: 128-
bit atomics. On quite a lot of platforms, you must link to libatomic for those
to work. You don't need to provide your own implementation, all you want to
know is whether you need an extra -l switch to your linker. That's not
something you could do with #if or a C++ language construct.
[Admittedly, this is something compiler & Standard Library vendors should fix
so the use of 128-bit atomic causes the linker to automatically pull in
libatomic]
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel DCAI Platform & System Engineering
Received on 2025-03-21 17:06:01