March 2013

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.

New paper: N3607, Making Non-modifying Sequence Operations More Robust -- Mike Spertus, Attila Pall

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: N3607

Date: 2013-03-15

Making Non-modifying Sequence Operations More Robust

by Mike Spertus, Attila Pall

Excerpt:

We propose adding overloads for std::equal, std::mismatch, and std::is_permutation to accept two ranges. When using these overloads, the caller does not need to separately check that the two ranges are of the same length.

New paper: N3606, Extending std::search to use Additional Searching Algorithms -- Marshall Clow

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: N3606

Date: 2013-03-17

Extending std::search to use Additional Searching Algorithms

by Marshall Clow

Excerpt:

Two additional search algorithms are proposed for inclusion into the standard: "Boyer-Moore" and "Boyer-Moore-Horspool". Additionally, the interface for the search objects is documented so that library implementers and end users can create their own search objects and use them with std::search.

New paper: N3605, Member Initializers and Aggregates -- Ville 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: N3605

Date: 2013-03-15

Member Initializers and Aggregates

by Ville Voutilainen

Excerpt:

Bjarne Stroustrup and Richard Smith raised an issue about aggregate initialization and member-initializers not working together. This paper proposes to fix the issue by adopting Smith's proposed wording that removes a restriction that aggregates can't have member-initializers.