C++ Logo

sg10

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 04:21:58 +0300
On Tue, 9 Jun 2020 at 03:55, Peter Dimov <pdimov_at_[hidden]> wrote:
>
> Ville Voutilainen wrote:
>
> > And *callers* do no using-declarations, and no ifdeffing.
>
> This will only work if get<> is visible to normal lookup. (Well it works
> under Clang, with a warning that it's C++20 only.)
> https://godbolt.org/z/Z3LkwJ

So? John's work-around makes get<> visible to normal lookup, thus:
https://godbolt.org/z/Zvqjze

With C++20 in hand, the work-around can be removed. Targeting both
C++20 and earlier standard versions,
I'd need to know when to include the work-around and when not. So how
about giving me a feature-testing
macro for that?

Received on 2020-06-08 20:25:19