Standardization

New paper: N3719, Extend INVOKE to support types convertible to target class -- Tomasz KamiƄski

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

Date: 2013-08-17

Extend INVOKE to support types convertible to target class

by Tomasz Kamiński

Excerpt:

This proposal is to extend the definition of INVOKE for class member pointers to cover types convertible to a target class of the pointer, like std::reference_wrapper.

Proposal also resolves LWG issue #2219

New paper: N3718, Transactional Memory Support for C++ -- V. Luchangco, J. Maurer, M. Moir, et al.

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

Date: 2013-08-30

Transactional Memory Support for C++

by Victor Luchangco, Jens Maurer, Mark Moir, et al.

Excerpt:

Transactional memory supports a programming style that is intended to facilitate parallel execution with a comparatively gentle learning curve. This document describes a proposal developed by SG5 to introduce transactional constructs into C++ as a Technical Specification. It is based in part on the Draft Specification for Transactional Constructs in C++ (Version 1.1) published by the Transactional Memory Specification Drafting Group in February 2012. This proposal represents a pragmatic basic set of features, and omits or simplifies a number of controversial or complicated features from the Draft Specification. Our goal has been to focus the SG5’s efforts towards a basic set of features that is useful and can support progress towards possible inclusion in the C++ standard. Reflecting this goal, for the first time, we present precise wording changes relative to the Working Draft of the C++ Standard (N3690) to implement this proposal. This document consists of an informal overview of the proposal, several illustrative examples, a summary of some of the discussion in SG5 and the earlier drafting group about design choices, and the above-mentioned wording changes.

New paper: N3717, SG5: Transactional Memory (TM) Meeting Minutes 2013/06/24-2013/08/26 -- M. Wong

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

Date: 2013-08-30

SG5: Transactional Memory (TM) Meeting Minutes 2013/06/24-2013/08/26

by Michael Wong

Excerpt:

Minutes for 2013/06/24 SG5 Conference Call

Minutes for 2013/07/08 SG5 Conference Call

Minutes for 2013/07/22 SG5 Conference Call

Minutes for 2013/08/05 SG5 Conference Call

Minutes for 2013/08/19 SG5 Conference Call

Minutes for 2013/08/26 SG5 Conference Call

New papers: N3713-15, Core Issues Lists -- William M. Miller

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: N3713, N3714, N2715

Date: 2013-09-03

C++ Standard Core Language Active Issues, Revision 85

C++ Standard Core Language Defect Reports and Accepted Issues, Revision 85

C++ Standard Core Language Closed Issues, Revision 85

by William M. Miller

Excerpt:

The purpose of these documents is to record the disposition of issues that have come before the Core Language Working Group of the ANSI (INCITS PL22.16) and ISO (WG21) C++ Standard Committee.

New paper: N3712, Policy-Based Design for Safe Destruction in Concurrent Containers -- Arch Robison

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

Date: 2013-08-30

Policy-Based Design for Safe Destruction in Concurrent Containers

by Arch Robison

Excerpt:

Writing containers that support concurrent access/modi cation by multiple threads incurs a special problem: when is it safe to delete an object? The problem is surprisingly tricky when lock-free operations are involved. Numerous general means have been proposed, ...

This paper sketches a way of abstracting these means so that concurrent container implementations could be parameterized over these means, thus allowing users to select the means best for their context. ...

This paper presents a sketch, not a complete proposal. It is intended to elicit discussion from experts as to whether the abstraction is viable. As such, this paper presents a fairly minimal interface that omits knobs for weak memory consistency and and extensive overloading of operators, so that experts can focus on a core question: Is the abstraction sufficient to support various means for deferred object deletion?

New paper: N3706, C++ Distributed Counters -- 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: N3706

Date: 2013-09-01

C++ Distributed Counters

by Lawrence Crowl

Excerpt:

We propose a set of coordinated counter types that collectively provide for distributed counting. The essential component of the design is a trade-off between the cost of incrementing the counter, the cost of loading (reading) the counter value, and the "lag" between an increment and its appearance in a "read" value. That is, the read of a counter value may not reflect the most recent increments. However, no count will be lost.

These counters are parameterized by the base integer type that maintains the count. Avoid situations that overflow the integer, as that may have undefined behavior. This constraint implies that counters must be sized to their use. (For dynamic mitigation, see the exchange operation below.)

New paper: N3763, Traversable Arguments for Container Constructors and ..., Wording Rev 4 -- 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: N3763

Date: 2013-09-01

Traversable arguments for container constructors and methods, wording revision 4

by Jeffrey Yasskin

Excerpt:

The STL brought the notion of a range to C++, expressed as a pair of iterators. C++11 added the range-based for loop, which iterates over a single object for which begin(x) and end(x) return that pair of iterators. The Boost.Range library extends this to a full library of algorithms based on ranges as single objects. We don't yet know the full design of the library we want to standardize, but a simple step we already know is needed is to allow the output of that library to be passed to existing functions in the standard library that already take an iterator-pair range.

New paper: N3762, string_view: a non-owning reference to a string, revision 5 -- 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: N3762

Date: 2013-09-01

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

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. ...

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 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.

Both Google's and LLVM's string_view types (but not Bloomberg's) extend the interface from std::string to provide some helpful utility functions:

Versions of std::string operations that take string_view instead also give the standard a way to provide in-place operations on non-null-terminated byte/character sequences:

  • hash, as requested by c++std-lib-31935
  • In a future addition, numeric conversions

New paper: N3766, The identity Type Transformation -- 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: N3766

Date: 2013-09-03

The identity type transformation

by Jeffrey Yasskin

Excerpt:

The need for the identity type transformation and backward-compatibility with the SGI library are still around, so this paper proposes two (mutually exclusive) options for nearly achieving both.

New paper: N3710, Specifying the absence of "out of thin air" results (LWG2265) -- Hans Boehm et al.

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

Date: 2013-08-29

Specifying the absence of "out of thin air" results (LWG2265)

by Hans Boehm, Mark Batty, Brian Demsky, Olivier Giroux, Paul McKenney, Peter Sewell, Francesco Zappa Nardelli, et al.

Excerpt:

The C++11 memory model specified the semantics of shared ordinary and atomic objects. There is one small part of this specification that we always recognized was dubious. The specification in 1.10 of weakly ordered atomics allows an atomic load to essentially see, or not see, the result of any racing store. In the case of explicit very weak memory ordering specifications, this can lead to "causal cycles" and highly counterintuitive results. ...

Essentially this issue has been an open issue in the Java specification for about 10 years. The major advantage that we have in C++ is that the problem is confined to non-synchronizing atomics, i.e. memory_order_relaxed, and some memory_order_consume uses (or read-modify-write operations that effectively weaken the ordering on either the read or write to one of those). Many of us expect those to be rarely used. ...

This proposal benefitted from a lengthy email discussion involving participants listed at the beginning of this paper, and others. This provided very useful input resulting in improvements to this proposal. It unfortunately resulted in neither a clear consensus in that group, nor an alternate proposal with clearly better consensus behind it. Not all of the listed contributors necessarily support this proposal. Since I don't believe there is support for maintaining the status quo, I nonetheless bring forward this proposal. Mark Batty and Peter Sewell are currently considering submitting additional late papers on this topic, including an alternate proposal. ...