Range Concepts, Part 1 of 4: Delimited Ranges

The start on a series about ranges from Eric Niebler:

Range Concepts, Part 1 of 4: Delimited Ranges

By Eric Niebler

From the Article:

I’ve been digging into ranges recently, and I’m finding them to be more than just a pair of iterators. In a series of posts, I’ll be expanding the notion of what a range is to cover some kinds of ranges not easily or efficiently expressible within the STL today: delimited ranges and infinite ranges. This post deals with the problems of representing delimited ranges with STL iterators.

N3919: Transactional Memory Support for C++ -- Victor Luchango, Michael Wong, et al.

Note: This paper was approved on Saturday at the Issaquah WA USA ISO C++ meeting as an indication of content for a new Transactional Memory Technical Specification.

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

Date: 2014-02-14

Transactional Memory Support for C++

by Victor Luchango, Michael Wong, 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 a revision of N3718, an earlier document with the same title, presented at the September 2013 meeting in Chicago. However, this document is selfcontained, and can be read independently of N3718. At the Chicago meeting, we received encouraging and helpful feedback, which we have used to revise this proposal.

This proposal 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. It 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 SG5’s efforts towards a basic set of features that is useful and can support progress towards possible inclusion in the C++ standard.

In addition to a description of the proposal, this document contains a summary of some of feedback we received at the Chicago meeting and of the discussion within SG5 since that meeting. Unlike N3718, it does not include examples or precise wording changes, as we have not yet revised them to reflect the changes in the proposal since N3718. However, these changes, summarized in Section 2.1, are mostly superficial.

N3929: Technical Specification: Concepts -- Andrew Sutton

Note: This paper was approved on Saturday at the Issaquah WA USA ISO C++ meeting to be turned into a Concepts Technical Specification working draft for expected adoption at our next meeting (June in Rapperswil, Switzerland).

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

Date: 2014-02-14

Technical Specification: Concepts

by Andrew Sutton

Excerpt:

C++ has long provided language support for generic programming in the form of templates. However, these templates are unconstrained, allowing any type or value to be substituted for a template argument, often resulting in compiler errors. What is lacking is a specification of an interface for a template, separate from its implementation, so that a use of a template can be selected among alternative templates and checked in isolation.

N3932: Variable Templates For Type Traits (Revision 1) -- Stephan T. Lavavej

Note: This paper was among the papers adopted into the draft Library Fundamentals TS yesterday at the Issaquah WA USA ISO C++ meeting.

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

Date: 2014-02-14

Variable Templates For Type Traits (Revision 1)

by Stephan T. Lavavej

Excerpt:

This updates N3854 [1] in response to the resolution for LWG 2112 [2], adding is_final_v...

N3927: Definition of Lock-Free -- Lawrence Crowl

Note: This paper was among the final papers adopted into draft C++14 yesterday at the Issaquah WA USA ISO C++ meeting.

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

Date: 2014-02-13

Definition of Lock-Free

by Lawrence Crowl

Excerpt:

This paper addresses issue LWG 2075: Progress guarantees, lock-free property, and scheduling assumptions. This issue is also US 5 in N3733 ISO/IEC CD 14882, C++ 2014, National Body Comments.

N3925: A sample Proposal, v4 -- Walter Brown

Note: This paper was among the papers adopted into the draft Library Fundamentals TS yesterday at the Issaquah WA USA ISO C++ meeting.

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

Date: 2014-02-14

A sample Proposal, v4

by Walter Brown

Excerpt:

This paper proposes to add to the standard library an interface for two algorithms carrying out random sampling. Such algorithms have long been part of the original (SGI) implementation of the Standard Template Library. ...

5 Acknowledgments

Many thanks to the readers of early drafts of this paper for their thoughtful comments, and to Matt Austern for the original proposal of the sampling algorithms.

N3924: Discouraging rand() in C++14, v2 -- Walter Brown

Note: This paper was among the final papers adopted into draft C++14 yesterday at the Issaquah WA USA ISO C++ meeting.

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

Date: 2014-02-14

Discouraging rand() in C++14, v2

by Walter Brown

Excerpt:

In their final Chicago deliberations re [N3775] vis-à-vis National Body comment US21, LEWG and LWG achieved joint consensus (1) to deprecate std::random_shuffle for C++14 as proposed, and (2) to strengthen the existing Note in [c.math]/5 in order to further encourage rand() users to migrate to the <random> component of the C++11 standard library. This paper provides wording to implement these decisions. ...

3 Acknowledgments

Many thanks, for their thoughtful comments, to Stephan T. Lavavej and the other reviewers of early drafts of this paper.

N3923: A SFINAE-Friendly std::iterator_traits, v3 -- Walter Brown

Note: This paper was among the papers adopted into the draft Library Fundamentals TS yesterday at the Issaquah WA USA ISO C++ meeting.

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

Date: 2014-02-14

A SFINAE-Friendly std::iterator_traits, v3

by Walter Brown

Excerpt:

This paper provides wording to reformulate the specification of iterator_traits so as to avoid a hard error when its template argument does not have the member types expected of a nonpointer iterator, and thus to make the trait conveniently usable in a SFINAE context.

N3921: string_view: a non-owning reference to a string, revision 7 -- Jeffrey Yasskin

Note: This paper was among the papers adopted into the draft Library Fundamentals TS at the Issaquah WA USA ISO C++ meeting.

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

Date: 2014-02-14

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

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

Acknowledgements

I'd like to thank Marshall Clow, Olaf van der Spek, the Boost and std-proposals mailing lists, Chandler Carruth, Beman Dawes, Alisdair Meredith, and especially Daniel Krügler for help, advice, and wording in this paper.

N3920: Extending shared_ptr to Support Arrays, Revision 2 -- Peter Dimov

Note: This paper was among the papers adopted into the Library Fundamentals TS yesterday at the Issaquah WA USA ISO C++ meeting.

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

Date: 2014-02-13

Extending shared_ptr to Support Arrays, Revision 2

by Peter Dimov

Excerpt:

This paper proposes adding array support to shared_ptr, via the syntax shared_ptr<T[]> and shared_ptr<T[N]>.

...

Thanks to Glen Fernandes, whose contribution of boost::make_shared for arrays prompted the boost::shared_ptr additions proposed herein.

Thanks to Daniel Krügler for reviewing an earlier revision of this paper and suggesting wording improvements.

Thanks to Jonathan Wakely for providing valuable feedback.