Date: Mon, 12 Jan 2026 12:01:42 +0200
On Mon, 12 Jan 2026 at 05:44, Liu Yanzuo via Std-Discussion
<std-discussion_at_[hidden]> wrote:
>
> Hi,
>
> I noted that, in [P1306R5 3.3 Expansion over Tuples](https://wg21.link/p1306r5#expansion-over-tuples):
>
> > get-expr(i) is __vi if either the referenced type is an lvalue reference or the expansion-initializer is an lvalue. Otherwise, std::move(__vi).
>
> This logic doesn't appear in the proposed wording. Was it forgotten?
It does appear there, because that logic is what structured bindings
end up doing. We end up going to
[dcl.struct.bind]/7, the sub-paragraph in the middle:
"In either case, e is an lvalue if the type of the entity e is an
lvalue reference and an xvalue otherwise. Given
the type Ti designated by std::tuple_element<i, E>::type and the type
Ui designated by either Ti & or
Ti&&, where Ui is an lvalue reference if the initializer is an lvalue
and an rvalue reference otherwise".
<std-discussion_at_[hidden]> wrote:
>
> Hi,
>
> I noted that, in [P1306R5 3.3 Expansion over Tuples](https://wg21.link/p1306r5#expansion-over-tuples):
>
> > get-expr(i) is __vi if either the referenced type is an lvalue reference or the expansion-initializer is an lvalue. Otherwise, std::move(__vi).
>
> This logic doesn't appear in the proposed wording. Was it forgotten?
It does appear there, because that logic is what structured bindings
end up doing. We end up going to
[dcl.struct.bind]/7, the sub-paragraph in the middle:
"In either case, e is an lvalue if the type of the entity e is an
lvalue reference and an xvalue otherwise. Given
the type Ti designated by std::tuple_element<i, E>::type and the type
Ui designated by either Ti & or
Ti&&, where Ui is an lvalue reference if the initializer is an lvalue
and an rvalue reference otherwise".
Received on 2026-01-12 10:02:03
