P0144R1 and P0217R0: Structured bindings (Sutter, Stroustrup, Dos Reis) and wording (Maurer)

New WG21 papers are available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

 

P0144R1: Structured bindings (Herb Sutter, Bjarne Stroustrup, Gabriel Dos Reis)

This paper proposes the ability to declare multiple variables initialized from a tuple or struct, along the lines of:

tuple f(/*...*/) { /*...*/ return {a,b,c}; } 

auto {x,y,z} = f(); // x has type T1, y has type T2, z has type T3 

This addresses the requests for support of returning multiple values, which has become a popular request lately.

Proposed wording appears in a separate paper, P0217.

 

P0217R0: Proposed wording for structured bindings (Jens Maurer)

This paper presents the proposed wording to implement structured bindings as described by Herb Sutter, Bjarne Stroustrup, and Gabriel dos Reis in P0144R1.

 

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.