New paper: N3619, A Proposal to Add Swappability Traits to the Standard Library -- Andrew Morrow

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3619

Date: 2013-03-15

A Proposal to Add Swappability Traits to the Standard Library

by Andrew Morrow

Excerpt:

This proposal proposes the addition of two new type property predicates to the C++ standard library: std::is_swappable<T, U = T> and std::is_nothrow_swappable<T, U = T>

 

New paper: N3618, What Can Signal Handlers Do? (CWG 1441) -- Hans-J. Boehm

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3618

Date: 2013-03-17

What Can Signal Handlers Do? (CWG 1441)

by Hans-J. Boehm

Excerpt:

CWG Issue 1441 points out that in the process of relaxing the restrictions on asynchronous signal handlers to allow use of atomics, we inadvertently made it impossible to use even local variables of non-volatile, non-atomic type. As a result of an initial discussion within CWG, Jens Maurer generated a proposed resolution, which addresses that specific issue.

Later discussion in SG1, both in Portland and during the February 2013 SG1 teleconference, raised a number of additional issues. Both Jens' solution and all prior versions of the standard still give undefined behavior to code involving signal handlers which we believe should clearly be legal. For example, a signal handler should be allowed to access "read-only" data that has not been modified since the signal handler was installed. Our goal is to correct such oversights, and allow some realistic signal handlers to be portable, while preserving a significant amount of implementation freedom with respect to what is allowable in a signal handler. In particular, we do not want to reinvent Posix' notion of async-signal-safe functions here.

...

We give several proposed changes and summarize the reasoning behind the change as well as some of the past discussion: ...

New paper: N3617, Lifting Overload Sets into Function Objects -- Philipp Juschka

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3617

Date: 2013-03-14

Lifting Overload Sets into Function Objects

by Philipp Juschka

Excerpt:

Many generic libraries, including the standard library, draw from the functional programming paradigm, where passing around functions is a common occurence. This proposal aims to allow the usage of functional techniques with plain old overloaded functions and function templates without needing to create a function object by hand. 

New paper: N3615, Constexpr Variable Templates -- Gabriel Dos Reis

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3615

Date: 2013-03-18

Constexpr Variable Templates

by Gabriel Dos Reis

Excerpt:

The aim of this proposal is to simplify definitions and uses of parameterized constants. It allows the declaration of constexpr variable templates. The upshot is a simpler programming rule to remember. It supersedes currently known workarounds with more predictable practice and semantics.

New paper: N3613, "Static If" Considered -- Bjarne Stroustrup, Gabriel Dos Reis, Andrew Sutton

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3613

Date: 2013-03-16

"Static If" Considered

by Bjarne Stroustrup, Gabriel Dos Reis, Andrew Sutton

Excerpt:

The static if feature recently proposed for C++ [1, 2] is fundamentally flawed, and its adoption would be a disaster for the language.

New paper: N3612, Desiderata of a C++11 Database Interface -- Thomas Neumann

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3612

Date: 2013-03-15

Desiderata of a C++11 Database Interface

by Thomas Neumann

Excerpt:

With the recent papers N3415 and N3458 two proposals have been made for a standard database interface in the C++ standard, based upon C++11 features. In addition, a wide range of C++98 database interfaces already exist. Before designing just another interface, we therefore discuss the desirable properties or requirements of a database interface. In the following we classify these requirements in three rough groups, from high-level to low-level. It might not be feasible to fulfill all of these in one unified interface, therefore the group order also roughly implies importance. Afterwards we give a rough classification of existing interfaces according to the desired properties.

New paper: N3611, A Rational Number Library for C++ -- Bill Seymour

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3611

Date: 2013-03-15

A Rational Number Library for C++

by Bill Seymour

Excerpt:

This paper proposes a rational number library for a C++ Technical Specification (TS).

Revision history:

  • N3363 – post-Kona (original)
  • N3414 – pre-Portland
  • N3489 – post-Portland
  • N3611 – this paper

 

New paper: N3610, Generic Lambda-capture Initializers, Supporting Capture-by-move -- V Voutilainen

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3610

Date: 2013-03-15

Generic Lambda-capture Initializers, Supporting Capture-by-move

by Ville Voutilainen

Excerpt:

C++11 lambdas do not support capture-by-move. There has been at least two rejected NB comments on this for C++11, the first one was JP9 on CD1, the second was FI8 on FCD. FI8 refers to a Core reflector message by Roshan Naik, where Roshan explains that it would be very useful to be able to move-capture containers and other objects that are expensive to copy. Furthermore, move-only types like iostreams (especially stringstreams) and unique_ptrs can't be captured without wrapping them. This lack of cooperation between move semantics and lambdas was briefly discussed in the Evolution Working Group in Portland 2012 as one of potential extensions that would "complete C++11". Unfortunately, scheduling conflicts and lack of time has prevented producing a wording proposal for such an extension; this paper tries to explain the intended design. 

New paper: N3609, string_view: A Non-owning Reference to a String, Revision 3 -- Jeffrey Yasskin

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3609

Date: 2013-03-15

string_view: A Non-owning Reference to a String, Revision 3

by Jeffrey Yasskin

Excerpt:

Google, LLVM, and Bloomberg have independently implemented a string-reference type to encapsulate this kind of argument. string_view is implicitly constructible from const char* and std::string. It provides most of the const member operations from std::string to ease conversion. This paper follows Chromium and Bloomberg in extending string_view to basic_string_view<charT>, and further extends it to include a traits parameter to match basic_string. We provide typedefs to parallel the 4 basic_string typedefs.

New paper: N3608, exchange() Utility Function, Revision 2 -- Jeffrey Yasskin

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N608

Date: 2013-03-15

exchange() Utility Function, Revision 2

by Jeffrey Yasskin

Excerpt:

Revises N3511 by adding a default template argument.