N3956: ISO/IEC CD 14882, C++ 2014, Responses to National Body Comments -- Barry Hedquist

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.

Note: This document summarizes the responses to all national comments in last year's CD ballot for C++14, which ballot resolution was completed this month at the Issaquah meeting. C++14 is now about to go out for its next ballot stage, DIS (Draft International Standard).

Document number: N3956

Date: 2014-02-24

ISO/IEC CD 14882, C++ 2014, Responses to National Body Comments

by Barry Hedquist

Excerpt:

Attached is a complete set of the WG21 Responses to National Body Comments in response to the SC22 Ballot for ISO/IEC CD 14882, Committee Draft of the revision of ISO/IEC 14882:2011, aka C++ 2014.

Range Concepts, Part 3 of 4: Introducing Iterables

The third part of Eric Nieblers Series on ranges

Range Concepts, Part 3 of 4: Introducing Iterables

by Eric Niebler

From the Article:

In the last two blog posts, I describes the challenges I’ve encountered while building a next-generation range library. In this post, I’ll sketch for you my proposed solution: refinements of the range concepts that allow delimited, infinite, and pair-o’-iterator-style ranges to fit comfortably within the concept hierarchy without loss of performance or expressive power and with increased safety. I’ve built a range library around these concepts that subsumes and extends all of the C++98 STL algorithms and the Boost.Range adaptors, so I can say with confidence that these concepts lead to a useful and consistent generic range library.

Quick Q: How can I make my constructor take a list of things, like map and vector? -- StackOverflow

Quick A: By having your constructor take an initializer_list<> of the appropriate type.

Today on StackOverflow:

Constructor similar to std::map or std::vector in a class

I'm creating a class and I want to know how to create a constructor similar to the std::map or std::vector style.

std::map<std::string, std::string> map = {
    {"foo", "bar"},
    {"biz", "buz"},
    {"bez", "boz"}
};

The difference is that I don't want my class to ask for types that wants to accept, just like std::map does.

std::map<std::string, std::string>

I want my class to accept that style of arguments:

{
    {"foo", "bar"},
    {"biz", "buz"},
    {"bez", "boz"}
};

But with defined type. (std::string, Typer)

The 'Typer' is a class that I will insert as value on the std::map.

Thank you.

Clang 3.4 and C++14

With the technical completion of C++14 (we think) reported on Monday, we'd like to link to this recent post for your Friday reading pleasure to recap some of the features of C++14.

There are other articles summarizing C++14 features, but some of the short code examples in this one go beyond what we've seen posted elsewhere and are quite interesting. For example, check out primes.

Clang 3.4 and C++14

by Scott Prager

From the article:

With each new release, gcc and clang add on more C++11 and C++14 features. While clang has been behind on some features, though ahead on others, they now claim to have C++1y all worked out...

N3939: Extending make_shared to Support Arrays, Revision 2 -- Peter Dimov, Glen Fernandes

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

Date: 2014-02-17

Extending make_shared to Support Arrays, Revision 2

by Peter Dimov and Glen Fernandes

Excerpt:

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

This revision of N3870 removes the scalar T&& overloads, reflecting the result of the LEWG review.

Call for Papers for Meeting C++ 2014

Finally I can announce the date and place for Meeting C++ 2014:
We will meet this year in Berlin at the Andels Hotel on the 5th and 6th December!

With the announcement also the call for papers has started, until April 20th you can send in your talks for the conference. This years theme track is "Scientific Programming with C++", I hope to have again a lot of diverse talks about C++ at the conference!

Range Concepts, Part 2 of 4: Infinite Ranges

The second part of Eric Nieblers Series about ranges:

Range Concepts, Part 2 of 4: Infinite Ranges

By Eric Niebler

From the Article:

In the last post, I tried to make delimited ranges fit into the STL and found the result unsatisfying. This time around I’ll be trying the same thing with infinite ranges and will sadly be reaching the same conclusion. But the exercise will point the way toward an uber-Range concept that will subsume delimited ranges, infinite ranges, and STL-ish pair-o’-iterator ranges.