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 17:43:05 +0300
On Tue, 9 Jun 2020 at 17:39, Barry Revzin <barry.revzin_at_[hidden]> wrote:

> I guess Qt just needs to make sure that its sufficiently uninvokable get() in the global namespace doesn't conflict with other libraries that want to do the same thing. So you could do:
>
> namespace voldemort::qt::lol { class get_tag { explicit get_tag(int); }; }
> template <typename T> void get(voldemort::qt::lol::get_tag );
>
> That works with Marc's example (gcc 7.1 and clang 6): https://godbolt.org/z/NAB3G3 and seems ... rather unlikely ... to conflict with anything. You could just provide this unconditionally?

This is not a Qt-specific issue. If it were, you wouldn't have heard
about it. These work-arounds are exactly the opposite
of what we want to do wrt the simplicity that Gaby is talking about,
and a feature-testing macro paves the migration
road to get to that simpler world.

Received on 2020-06-09 09:46:25