May 2014

N3996: Static reflection -- Matúš Chochlík

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

Date: 2014-05-26

Static reflection

by Matúš Chochlík

Excerpt:

Reflection and reflective programming can be used for a wide range of tasks such as implementation of serialization-like operations, remote procedure calls, scripting, automated GUI-generation, implementation of several software design patterns, etc. C++ as one of the most prevalent programming languages lacks a standardized reflection facility.

N3980: Types Don't Know # -- Howard Hinnant

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

Date: 2014-05-24

Types Don't Know #

by Howard Hinnant

Excerpt:

This paper proposes a new hashing infrastructure that completely decouples hashing algorithms from individual types that need to be hashed. This decoupling divides the hashing computation among 3 different programmers who need not coordinate with each other: ...

To start off with, we emphasize: there is nothing in this proposal that changes the existing std::hash, or the unordered containers. And there is also nothing in this proposal that would prohibit the committee from standardizing both this proposal, and either one of N3333 or N3876.

N3978: C++ Ostream Buffers -- Lawrence Crowl, Peter Sommerlad

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

Date: 2014-05-26

C++ Ostream Buffers

by Lawrence Crowl, Peter Sommerlad

Excerpt:

At present, stream output operations guarantee that they will not produce race conditions, but do not guarantee that the effect will be sensible. Some form of external synchronization is required. Unfortunately, without a standard mechanism for synchronizing, independently developed software will be unable to synchronize. ...

The general consensus in the July 2013 meeting of the Concurrency Study Group was that buffering should be explicit. This paper proposes such an explicit buffering.

N4039: Default executor -- Adam Berkan, Chris Mysen, Hans Boehm

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

Date: 2014-05-23

Default executor

by Adam Berkan, Chris Mysen, Hans Boehm

Excerpt:

So far the standard has been quiet about whether there is a default executor (See n3785 for more about executors).  A well-written library that wishes to be flexible should take an executor as a parameter.  Unfortunately there is today no good default for that library.  Programmers want a way to run tasks asynchronously without having to create new executors. ...

We’ve been discussing a number of proposals;  they all have pros and cons.  They all center around 3 new standard executors: ... We don’t think any specific favorite proposal is obviously the best, but would like to hear what others think...

N3967-69: 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: N3967-69

Date: 2014-03-24

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

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

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

by Alisdair Meredith

N4043: Dynarray Allocation Context -- 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: N4043

Date: 2014-05-22

Dynarray Allocation Context

by Lawrence Crowl

Excerpt:

Introduction

The dynarray class (N3662 C++ Dynamic Arrays and N3820 Working Draft, Technical Specification — Array Extensions) and any other named class attempting to use the execution stack for allocation may suffer failure if the class is reallocated with in-place destruction and a placement new. This problem is described in N3899 Nested Allocation section Nested Lifetime. We need specific wording to address this case.

Solution

We choose to permit the stack optimization for constructors called an automatic variables and then only if not called with the placement new operator. This change effectively requires the compiler to recognize the context of a constructor call and, when appropriate, change the implementation to an alternate implementation.

N4042: Safe conversions in unique_ptr<T[]> -- Geoffrey Romer

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

Date: 2014-05-23

Safe conversions in unique_ptr<T[]>

by Geoffrey Romer

Excerpt:

This paper proposes to resolve LWG 2118 by permitting conversions to unique_ptr<T[]> if they are known to be safe.

N4038: Proposal for Unbounded-Precision Integer Types -- Pete Becker

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

Date: 2014-05-23

Proposal for Unbounded-Precision Integer Types

by Pete Becker

Excerpt:

What’s New in this Revision

  • In integer, replaced constructors taking arithmetic types with a templated constructor and added a templated assignment operator for arithmetic types. In bits, replaced constructors taking integral types with a templated constructor and added a templated assignment operator for integral types.
  • Added integer::is_zero.
  • Added noexcept to unary integer::operator- and unary integer::operator+.
  • Added several issues raised by Marc Glisse.

Overview

Programmers sometimes need to manipulate integer values that are too large to repesent with C++’s standard integer types. Doing a Google search for terms that describe large integers produces many hits for libraries that handle large integers. These libraries vary in quality, from hacks by beginners to sophisticated, professional implementations. Also, Java has unbounded precision integers as part of its standard class library.

One important use for unbounded-precision integers is cryptography. Cryptographic applications typically manipulate integer values of several hundred digits. If the C++ standard library provides facilities for such values it will make cryptographic applications easier to write and to port. ...

N4033: synchronized_value for associating a mutex with a value -- Anthony Williams

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

Date: 2014-05-23

synchronized_value for associating a mutex with a value

by Anthony Williams

Excerpt:

A couple of years ago I wrote an article for Dr Dobb's Journal discussing a synchronized_value template to associate a mutex with a value. I'd like to propose that template for standardization, with a few modifications.

The basic idea is that synchronized_value<T> stores a value of type T and a mutex. It then exposes a pointer interface, such that derefencing the pointer yields a special wrapper type that holds a lock on the mutex, and that can be implicitly converted to T for reading, and which forwards any values assigned to the assignment operator of the underlying T for writing. There is also an arrow operator which allows member functions on the wrapped value to be called...

N4032: Comments on continuations and executors -- Anthony Williams

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

Date: 2014-05-23

Comments on continuations and executors

by Anthony Williams

Excerpt:

Having implemented the concurrency extensions from D3904 from the Issaquah wiki, it is apparent that there are several aspects of the specification which are incomplete, and others which I find undesirable.

This paper attempts to enumerate those aspects, and proposes fixes and suggestions.