C++ Logo

std-discussion

Advanced search

Re: std::apply and adl get

From: Jason Cobb <jason.e.cobb_at_[hidden]>
Date: Tue, 28 Sep 2021 16:58:22 -0400
On 9/28/21 16:00, Giuseppe D'Angelo via Std-Discussion wrote:
> Hi,
>
> Il 28/09/21 21:21, Peter Sommerlad (C++) via Std-Discussion ha scritto:
>> As the author of the initial spec for apply (after its implementation
>> was available as an example in the standard, I think that when apply was
>> specified, structured bindings weren't invented yet, and nobody thought
>> about applying apply to something that is not a tuple. I would say that
>> structured bindings were the reason to expand the possibilities to
>> non-tuples and allowing therefore the customization.
> Is it by design that apply uses std::get, but make_from_tuple uses
> unqualified get?
>
> https://eel.is/c++draft/tuple.apply
>
> (Implementations seem to use std::get for both, FWIW.)
>

The get in make_from_tuple is implicitly qualified. See [0]

[0]: https://eel.is/c++draft/library#contents-3

-- 
Jason Cobb
Assessor, Rulekeepor, S​tonemason

Received on 2021-09-28 15:58:27