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. 

New paper: N3604, Centralized Defensive-Programming Support for Narrow Contracts -- Lakos, Zakharov

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

Date: 2013-03-18

Centralized Defensive-Programming Support for Narrow Contracts

by John Lakos, Alexei Zakharov

Excerpt:

In this proposal, we describe a centralized facility for supporting defensive runtime validation of function preconditions. What makes this overall approach ideally (and uniquely) suited for standardization is that it allows the application to (1) indicate coarsely (at compile time) the extent to which precondition checking should be enabled based on how much defensive overhead the application (as a whole) can afford, and (2) specify exactly (at runtime) what action is to be taken should a precondition violation be detected.

New paper: N3603, A Three-Class IP Address Proposal -- Christopher Kohlhoff

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

Date: 2013-03-17

A Three-Class IP Address Proposal

by Christopher Kohlhoff

Excerpt:

This proposal describes a three-class design for IP address classes:

  • A vocabulary type, ip::address, for use in IP version independent code.
  • An IPv4-specific type ip::address_v4.
  • An IPv6-specific type ip::address_v6.

 

New paper: N3602, Template Parameter Deduction for Constructors -- Mike Spertus

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

Date: 2013-03-14

Template Parameter Deduction for Constructors

by Mike Spertus

Excerpt:

This paper proposes extending template parameter deduction for functions to constructors of template classes. The clearest way to describe the problem and solution is with some examples.