Title
Reference collapsing and structured bindings
Status
open
Section
9.6 [dcl.struct.bind]
Submitter
Daveed Vandevoorde

Created on 2017-03-29.00:00:00 last changed 93 months ago

Messages

Date: 2017-03-29.00:00:00

According to 9.6 [dcl.struct.bind] paragraph 3,

Given the type Ti designated by std::tuple_element<i, E>::type, each vi is a variable of type “reference to Ti” initialized with the initializer, where the reference is an lvalue reference if the initializer is an lvalue and an rvalue reference otherwise; the referenced type is Ti.

If Ti is already a reference type, should this do reference collapsing? Presumably yes, but reference collapsing is specified in terms of a typedef-name or decltype-specifier, which are not used in this description.

See also issue 2313.

History
Date User Action Args
2017-03-29 00:00:00admincreate