September 2013

New paper: N3759, SIMD Vector Types -- Matthias Kretz

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

Date: 2013-08-30

SIMD Vector Types

by Matthias Kretz

Excerpt:

The challenge remains in providing portable SIMD types and operations.

... 

C++ has no means to use SIMD operations directly. There are indirect uses through loop vectorization or optimized algorithms (that use extensions to C/C++ or assembler for their implementation).

All compiler vendors (that I worked with) add intrinsics support to their compiler products to make these operations accessible from C. These intrinsics are inherently not portable and most of the time very directly bound to a specific instruction. (Compilers are able to statically evaluate and optimize SIMD code written via intrinsics, though.) ...

... This is a pure library proposal. It does depend on implementation-specific language extensions, though (e.g. SIMD intrinsics/builtins). The proposal builds upon the experience from the Vc library [1, 2].

New paper: N3758, Standard exception information types for std::exception -- Emil Dotchevski

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

Date: 2013-08-30

Standard exception information types for std::exception

by Emil Dotchevski

Excerpt:

This proposal defines standard exception information types compatible with N3757.

New paper: N3757, Support for user-defined exception information and diagnosti... -- Emil Dotchevski

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

Date: 2013-08-30

Support for user-defined exception information and diagnostic information in std::exception

by Emil Dotchevski

Excerpt:

This document proposes extending std::exception to allow exception-neutral contexts to intercept any std::exception object and store into it arbitrary additional data needed to handle the exception (the propagation of the original exception object can then be resumed by a throw without argument.)

New papers: N3754-56, Library Issues Lists -- Alisdair Meredith

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 numbers: N3754-56

Date: 2013-09-03

C++ Standard Library Active Issues List (Revision R84)

C++ Standard Library Defect Report List (Revision R84)

C++ Standard Library Closed Issues List (Revision R84)

by Alisdair Meredith

Excerpt:

The purpose of this document is to record the status of issues which have come before the Library Working Group (LWG) of the INCITS PL22.16 and ISO WG21 C++ Standards Committee. Issues represent potential defects in the ISO/IEC IS 14882:2011(E) document.

New paper: N3753, Centralized Defensive-Programming Support for Narrow C... -- J. Lakos, A. 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: N3753

Date: 2013-08-30

Centralized Defensive-Programming Support for Narrow Contracts (Revision 1)

by J. Lakos, A. 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. Moreover, the flexibility of this supremely general solution to precondition validation lends itself to a thorough, yet surprisingly easy-to-use testing strategy, often called negative testing, for which a supportive framework is also provided. Finally, this general approach to implementing and validating defensive checks is not just a good idea: It has been successfully used in production software at Bloomberg for over a decade, was presented at the ACCU conference in 2011, and is currently available along with copious usage examples embedded in running library code as part of Bloomberg’s open-source distribution of the BSL library at https://github.com/bloomberg/bsl.

New paper: N3752, Index Based Ranges -- A. Shödl, F. Fracassi

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

Date: 2013-08-30

Index Based Ranges

by A. Shödl, F. Fracassi

Excerpt:

In contrast to most currently popular range implementations, which define range iterations in terms of (pairs of) iterators we propose to use range adaptors and indices (which is similar to N1873 - Cursor/Property Maps). The most important consequence of this is that we can avoid ”Fat Iterators” when stacking range adaptors, in particular range filters.

New paper: N3751, Object Lifetime, Low-level Programming, and memcpy -- 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: N3751

Date: 2013-09-03

Object Lifetime, Low-level Programming, and memcpy

by Gabriel Dos Reis

Excerpt:

This document proposes to recognize a category of uses of memcpy -- currently left undefined -- as another form of object construction, thereby putting a class of existing practice in low-level system programming on firmer ground.

New paper: N3750, C++ Ostream Buffers -- Lawrence Crowl

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

Date: 2013-09-01

C++ Ostream Buffers

by Lawrence Crowl

Excerpt:

We propose an ostream_buffer, that provides access to a matching basic_ostringstream for buffering output operations. The ostream_buffer, will atomically transfer the contents of the basic_ostringstream to an ostream on destruction of the ostream_buffer.

New paper: N3749, Constexpr Library Additions: functional -- 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: N3749

Date: 2013-08-31

Constexpr Library Additions: functional

by Marshall Clow

Excerpt:

I propose that we make the following change:

template <class T = void> struct less {
  typedef T first_argument_type;
  typedef T second_argument_type;
  typedef bool result_type;

  constexpr bool operator()(const T& x, const T& y) const { return x < y; }

  };

This will allow people to use less<T>{}(x,y) at compile time.

This should also apply to all the relational operators (less, greater, less_equal, greater_equal, not_equal_to, equal_to), the arithmetic operators (plus, minus, multiplies, divides, modulus, negates), the bit manipulations (bit_and, bit_or, bit_xor, bit_not) and the negators (unary_negate, binary_negate, no1, not2).

New paper: N3748, Implicit Evaluation of auto Variables and Arguments -- Gottschling, Falcou, Sutter

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

Date: 2013-08-30

Implicit Evaluation of "auto" Variables and Arguments

by Peter Gottschling, Joel Falcou, Herb Sutter

Excerpt:

Type detection for variables from expressions' return type:

auto x= expr;

has proven high usability. However, it fails to meet most users' expectations and preferences when
proxies or expression templates (ET) are involved, e.g.:

matrix A, B;
// setup A and B
auto C= A  B;

Many people would expect C to be of type matrix as well. ...

Moreover, we assume that even people who are aware of expression templates will very often prefer the evaluated object (here a matrix containing the product of A and B) and not an unevaluated or partially evaluated object (representing the product of A and B).

We therefor need a mechanism to evaluate objects of certain types implicitly and sufficient
control over this mechanism.