C++ Logo

std-proposals

Advanced search

Re: Allow [[deprecated]] on call site to disable deprecated warning

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Thu, 28 Jan 2021 22:12:07 +0200
On Thu, 28 Jan 2021 at 21:32, Justin Bassett via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> You can hide the #ifdef #pragma soup underneath macros ( https://godbolt.org/z/bj7dG8 ):

Of course we can, and we do:
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qcompilerdetection.h#n1259
We can also do various tricks in the build system on a per-compiler basis.

But it's always better to have a single portable in-source way to do
these things, without having to write different code
for 6 different compilers, like that Qt code does, and then package
all of that under a single interface.

Received on 2021-01-28 14:12:21