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.

N3836-38, Evolution Issues Lists -- Ville Voutilainen

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: N3836-38

Date: 2014-01-16

C++ Standard Evolution Active Issues List (Revision R05)

C++ Standard Evolution Completed Issues List (Revision R05)

C++ Standard Evolution Closed Issues List (Revision R05)

by Ville Voutilainen

Excerpt:

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

GotW #95 Solution: Thread Safety and Synchronization -- Herb Sutter

The solution to the latest GotW problem is now available:

GotW #95 Solution: Thread Safety and Synchronization

by Herb Sutter

From the article:

This GotW was written to answer a set of related frequently asked questions. So here’s a mini-FAQ on "thread safety and synchronization in a nutshell," and the points we’ll cover apply to thread safety and synchronization in pretty much any mainstream language.

ACCU 2014 conference schedule posted (April 8-12)

accu-2014.PNG

Conference chair Jon Jagger has published the conference schedule and session abstracts for ACCU 2014.

ACCU 2014 Conference Schedule

Follow conference news via @accu2014 on Twitter.

Some highlights of this year's schedule include a number of C++ talks. Most of the following speakers are ISO C++ committee members:

Switching to C++11 and C++14 in One Day (Nico Josuttis)

C++14 -- An Overview of the New Standard for C++(11) Programmers (Peter Sommerlad)

There Ain't No Such Thing As a Universal Reference (Jonathan Wakely)

The C++14 Standard Library (Jonathan Wakely)

C++ Dynamic Performance (Aleksandar Fabijanic)

C++ Undefined Behavior -- What Is It, and Why Should I Care? (Marshall Clow)

Large-Scale C++ -- Advanced Levelization Techniques (John Lakos)

C++ Pub Quiz (Olve Maudal)

Creating Safe Multi-Threaded Applications in C++11 (Jos van Eijndhoven)

Random Number Generation in C++ -- Present and Potential Future (Pattabi Raman)

Range and Elevation -- C++ In a Modern World (Steve Love)

Generic Programming with Concepts Lite (Andrew Sutton)

Where Is C++ Headed? (Hubert Matthews)

Complementary Visions: Integrating C++ and Python with Boost.Python (Austin Bingham)

The Continuing Future of C++ Concurrency (Anthony Williams)

Polymorphic Allocators for Fundamental Libraries (Alisdair Meredith)

Executors for C++ (Detlef Vollmann)

Endnote: Everything You Ever Wanted To Know About Move Semantics (and then some) (Howard Hinnant)

Using Regular Expressions with Modern C++ -- Kenny Kerr

dn519920.kenny_kerr_headshot(en-us,MSDN.10).jpgIn the current MSDN Magazine:

Using Regular Expressions with Modern C++

by Kenny Kerr

From the article:

C++11 introduced a long list of features that are in themselves quite exciting, but if all you see is a list of isolated features, then you’re missing out. The combination of these features makes C++ into the powerhouse that many have grown to appreciate. I’m going to illustrate this point by showing you how to use regular expressions with modern C++... the combination of C++ language and library features really turns C++ into a productive programming language.

Quick Q: How can I avoid writing ::value and ::type when using std::enable_if? -- StackOverflow

Quick A: Use a template alias. Several standard ones are coming in C++14.

Recently on SO:

How can I avoid writing ::value and ::type when using std::enable_if? [cppx]

In some of my code, namely the header rfc/cppx/text/String.h, I found the following mysterious snippet:

template< class S, class enable = CPPX_IF_( Is_a_< String, S > ) >
void operator!  ( S const& )
{ string_detail::Meaningless::operation(); }

The operator! is in support of a String class that has an implicit conversion to raw pointer. So I overload (among others) operator! for this class and derived classes, so that inadvertent use of a non-supported operator will give a suitable compilation error, mentioning that it's meaningless and inaccessible. Which I think is much preferable to such usage being silently accepted with an unexpected, incorrect result.

The CPPX_IF_ macro supports Visual C++ 12.0 (2013) and earlier, which finds C++11 using to be mostly beyond its ken. For a more standard-conforming compiler I would have written just ...

template< class S, class enable = If_< Is_a_< String, S > > >
void operator!  ( S const& )
{ string_detail::Meaningless::operation(); }

This looks like std::enable_if,

template< class S, class enabled = typename std::enable_if< Is_a_< String, S >::value, void >::type >
void operator!  ( S const& )
{ string_detail::Meaningless::operation(); }

except that the If_ or CPPX_IF_, and its expression, is much more concise and readable.

How on Earth did I do that?

 

Type Erasure, Part 4 -- Andrzej Krzemieński

In part 4, Andrzej wraps up his series on type erasure with a discussion and comparison of facilities in the standard library, Boost, and otherwise.

Type Erasure, Part 4

by Andrzej Krzemieński

From the article:

In this post we will be wrapping up the series on type erasure. We will see an another form of value-semantic type erasure: boost::any, and try to compare the different methods.