C++ Logo


Advanced search

Re: [SG10] [isocpp-core] Feature-test macro for ADL calls with template arguments?

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Tue, 9 Jun 2020 03:53:56 +0300
On Tue, 9 Jun 2020 at 03:44, Gabriel Dos Reis <gdr_at_[hidden]> wrote:
> [Richard]
> […] then it seems to me that the feature test macro doesn't give us syntactic simplicity either.
> It doesn’t.
> Feature test macros rarely do.

They're not supposed to. They are for either providing a work-around
when a new feature isn't available,
or a functionality subset when a work-around cannot be sanely written
by people who don't live and breathe
expert-level C++. That's what we're looking at here. With the
feature-test macro in hand, I can move
most of the complexity of this particular use case into the library
implementation, and have older
compilers still compile the code, and I can decide what I expose to
users, without requiring them
to do name-lookup-control incantations.

Which part of that is not a slam dunk is a complete mystery to me.

Received on 2020-06-08 19:57:15