January 2014

N3849: string_view: a non-owning reference to a string, r6 -- J 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: N3849

Date: 2014-01-20

string_view: a non-owning reference to a string, revision 6

by Jeffrey Yasskin

Excerpt:

References to strings are very common in C++ programs, but often the callee doesn't care about the exact type of the object that owns the data.

N3858: Resumable Functions -- Niklas Gustafsson, Deon Brewis, Herb 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: N3858

Date: 2014-01-19

Resumable Functions

by Niklas Gustafsson, Deon Brewis, Herb Sutter

Excerpt:

While presenting a proposal that can be adopted or rejected in isolation, this document is related to N3857. The reader is advised to read both as a unit and to consider how the two build on each other for synergy. Reading them in their assigned numeric order is advised.

New in this version: minor changes to examples, explanatory text; make the section on generators clearer.

N3848: Working Draft, Technical Spec. on C++ Extensions for Library Fundamentals -- 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: N3848

Date: 2014-01-18

Working Draft, Technical Specification on C++ Extensions for Library Fundamentals

by Jeffrey Yasskin

Excerpt:

This technical specification describes extensions to the C++ Standard Library (1.2). These extensions are classes and functions that are likely to be used widely within a program and/or on the interface boundaries between libraries written by different organizations.

... The goal of this technical specification it to build more widespread existing practice for an expanded C++ standard library.

N3851: Multidimensional bounds, index and array_view -- Łukasz Mendakiewicz, Herb 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: N3851

Date: 2014-01-17

Multidimensional bounds, index and array_view

by Łukasz Mendakiewicz, Herb Sutter

Excerpt:

Programs performing computations on multidimensional data are relatively common (e.g. operations on dense matrices or image processing) yet there is no standardized approach in C++ to express the concept of dimensionality. This document aims to fill this gap in the Standard C++ Library by proposing the following closely related types:

  • bounds and index as means of defining and addressing multidimensional discrete spaces.
  • array_view and strided_array_view as multidimensional views on contiguous or strided memory ranges, respectively.
  • bounds_iterator providing interoperability with iterator-based algorithms.

While the proposal builds on Microsoft experience of implementing and using similar extent, index and array_view types in their data parallel programming model -- C++ AMP [1] -- we believe that these concepts will also benefit a wider C++ community.

N3832: Task Region -- P Halpern, A Robison, H Hong, A Laksberg, G Nishanov, H 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: N3832

Date: 2014-01-17

Task Region

by Pablo Halpern, Arch Robison, Hong Hong, Artur Laksberg, Gor Nishanov, Herb Sutter

Excerpt:

This paper introduces C++ library functions task_region, task_run and task_wait that enable developers
to write expressive and portable parallel code.

...

A previous proposal, N3711, was presented to the Committee at the Chicago meeting in 2013. N3711 closely
follows the design of the PPL/TBB with slight modifications to improve exception safety.

This proposal adopts a simpler syntax than N3711 -- one that eschews a named object in favor of three
namespace-scoped functions. It improves N3711 in the following ways:

  • The exception handling model is simplified and more consistent with normal C++ exceptions.
  • Strict fork-join parallelism is now enforced at compile time.
  • The syntax allows scheduling approaches other than child stealing.

We aim to converge with the language-based proposal for low-level parallelism described in N3409 and related documents.

N3850: Working Draft, Technical Specification for C++ Extensions for Parallelism -- Jared Hoberock

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

Date: 2014-01-17

Working Draft, Technical Specification for C++ Extensions for Parallelism

by Jared Hoberock

Excerpt:

This Technical Specification describes requirements for implementations of an interface that computer
programs written in the C++ programming language may use to invoke algorithms with parallel execution.
The algorithms described by this Technical Specification are realizable across a broad class of computer
architectures.

... The goal of this Technical Specification is to build widespread existing practice for parallelism in the C++ standard algorithms library.

N3857: Improvements to std::future<T> and Related APIs --Gustafsson, Laksberg, Sutter, Mithani

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

Date: 2014-01-16

Improvements to std::future and Related APIs

by Niklas Gustafsson, Artur Laksberg, Herb Sutter, Sana Mithani

Excerpt:

This proposal is an evolution of the functionality of std::future/std::shared_future. It details additions which can enable wait free compositions of asynchronous operations.

This document supersedes N3784. Several typos in the code samples have been fixed, and a small editorial change made in the Technical Specification section.

N3880: Improving the Verification of C++ Programs -- Michael Price

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

Date: 2014-01-16

Improving the Verification of C++ Programs

by Michael Price

Excerpt:

Following is a list of ideas to serve as a starting point for further discussion. They are ordered roughly in their perceived difficulty/impact on the language and tools.

  • Capabilities for better static_assert messages
  • Better support for verifying API design decisions (i.e. testing compile-time failures)
  • Discrete classification of causes of ill-formedness
  • Better source code contextual information capabilities (as called for by Reflection study group)
  • A std::test_exception (bikeshed) type to serve as a basis for...
  • An full-featured assertion library
  • Registration of code to be run during verification
  • Automated generation of verification programs

N3873: Improved insertion interface for unique-key maps -- Thomas Köppe

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

Date: 2014-01-20

Improved insertion interface for unique-key maps

by Thomas Köppe

Excerpt:

The existing interface of unique-keyed map containers (std::map, std::unordered_map) is slightly underspecified, which makes certain container mutations more complicated to write than necessary. This proposal is to add new specialized algorithms:

  • emplace_stable(): if the key already exists, does not insert and does not modify the arguments.
  • emplace_or_update(): inserts or updates the mapped element if the key already exists.