2 Comments
User's avatar
Andrew's avatar

I don't think that the `::get`overload for `has_layout` is needed -- the compiler will try to use the member function`.get`first. I also don't believe it's correct if `T` is a reference type, and also for the `&T::template get<idx>` construct the compiler wouldn't be able to deduce the type parameter.

Expand full comment
Šimon Tóth's avatar

Thanks, I missed the method resolution part of structured binding.

And yes, also correct about the reference type.

Expand full comment