Standardization

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.

 

P0221R0: Proposed wording for default comparisons, revision 2 -- Jens Maurer

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

Document number: P0221R0

Date: 2016-02-10

Proposed wording for default comparisons, revision 2

by Jens Maurer

Excerpt:

This paper presents design rationale and proposed wording to implement default comparisons for class types. It is a revision of N4532 with additional updates from the Evolution Working Group session at the Kona meeting of WG21 and in-depth discussions with interested parties. Blue text in the proposed wording indicates changes compared to N4532.

This paper assumes that the reader is familar with N4475 "Default comparisons (R2)" by Bjarne Stroustrup. In particular, default comparisons are assumed to be implicit (i.e. require no extra syntax to be available). 

P0225: Why I want Concepts, and why I want them sooner rather than later -- Ville Voutilainen

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

Document number: P0225R0

Date: 2016-02-05

Why I want Concepts, and why I want them sooner rather than later

by Ville Voutilainen

Excerpt:

This paper provides highly-opinionated statements, anecdotes and personal opinions explaining why the author thinks Concepts should go into C++17 even if no Conceptified standard library parts are included in C++17.

N4573: February 2017 WG21 Meeting -- Tom Plum

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

Document number: N4573

Date: 2016-02-02

February 2017 WG21 Meeting

by Tom Plum

Excerpt:

The February 2017 WG21 meeting is sponsored by Plum Hall and the Standard C++ Foundation. The meeting will take place at the Royal Kona Resort, in Kailua-Kona Hawaii, Monday Feb 27 to Saturday Mar 04.

P0188R0: Wording for [[fallthrough]] attribute -- Andrew Tomazos

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.

Document number: P0188R0

Date: 2016-01-03

Wording for [[fallthrough]] attribute

by Andrew Tomazos

Abstract:

Wording for the [[fallthrough]] attribute described in P0068R0 is proposed for application to the C++17 working draft. [[fallthrough]] captures an intent to use the feature of “falling-through” from one case block to the next, in a switch statement. It has heavy use in existing practice. Kona EWG voted SF=15, F=5, N=0, A=0, SA=0 in favor of [[fallthrough]] from P0068R0. See P0068R0 for detailed motivation/rationale.

P0187R0: Proposal of Bitfield Default Member Initializers -- Andrew Tomazos

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.

Document number: P0187R0

Date: 2015-11-20

P0187R0: Proposal of Bitfield Default Member Initializers

by Andrew Tomazos

Abstract:

We propose default member initializers for bitfields. Example:

struct S {
  int x : 6 = 42;
};

To ease parsing we specify a rule, roughly summarized as “you have to use =, and = always starts the initializer”.

P0212: Wording for [[maybe_unused]] attribute -- Andrew Tomazos

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

Document number: P0212R0

Date: 2016-01-31

Wording for [[maybe_unused]] attribute

by Andrew Tomazos

Excerpt:

A wording for the [[maybe_unused]] attribute is proposed for application to the C++17 Working Draft. The semantics of [[maybe_unused]] are the same as those described for [[unused]] in P0068R0 and presented to Kona EWG. Kona EWG voted SF=5, F=11, N=2, A=0, SA=0 in favor of the attribute.

See P0068R0 for detailed motivation/rationale.

P0207: Ruminations on lambda captures -- Ville Voutilainen

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

Document number: P0207R0

Date: 2016-01-28

Ruminations on lambda captures

by Ville Voutilainen

Excerpt:

The proposal for capturing *this by value (P0018) raised suggestions for a "true value capture", which led to suggestions to change capture-default that defaults to by-value capture([=]) in the case of capturing class members. This paper explores what the suggested changes to the capture-default might mean. This paper specifically doesn't try to claim that any of the changes would have an effect on any particular amount of existing code, and admits that the examples in this paper are somewhat concocted and for illustrative purposes only. 

P0206R0: Discussion about std::thread and RAII -- Ville Voutilainen

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

Document number: P0206R0

Date: 2016-01-27

Discussion about std::thread and RAII

by Ville Voutilainen

Excerpt:

C++ continues not to provide a thread type that would join() automatically on scope exit. This causes exception-safety problems, because failing to join() in all code paths causes the destructor of a std::thread to terminate(). This paper explores various ways to solve the problem.