C++ Logo

SG10

Advanced search

Subject: Re: [isocpp-core] Feature-test macro for ADL calls with template arguments?
From: Barry Revzin (barry.revzin_at_[hidden])
Date: 2020-06-15 09:27:13


On Tue, Jun 9, 2020 at 10:18 AM Ville Voutilainen <
ville.voutilainen_at_[hidden]> wrote:

> On Tue, 9 Jun 2020 at 18:15, Barry Revzin <barry.revzin_at_[hidden]> wrote:
> >> I find it rather plausible that a simplicity-seeking programmer will
> >> just not provide a structured-bindings
> >> interface that he also wants to allow calling via ADL outside
> >> structured bindings when an implementation
> >> of P0846 is not available.
> > I'm having trouble parsing this sentence. Is the claim that being unable
> to write get<0>(e) is a reason for somebody to avoid opting into structured
> bindings?
>
> The claim is that it's plausible to not provide a get<> if it can't be
> ADL-called without additional incantations.
> Choosing to do so will also not-enable support for structured bindings.
>

That seems like a surprising choice to me... but conditionally providing
functionality is basically what we have feature test macros for, so I guess
it makes sense.

Barry



SG10 list run by sg10-owner@lists.isocpp.org