January 2014

C++ User Group Meetings in February

February will be a month full of C++ user group meetings:

C++ User Group Meetings in February

by Jens Weller

From the article:

There are a few new user groups, some of them even will meet in February for the first time. There is now a russian C++ users group organizing Meetings in St. Peterburg and Moscow. In Germany, the C++ user group Munich has met in January for the first time, with over 50 people attending the first meeting. In February the user groups of Aachen and Dortmund will meet for the first time. And, already meeting last year for the first time, there is now a dutch C++ user group!

N3852: C++ CD Comment Status, Rev. 3 -- 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: N3852

Date: 2014-01-30

C++ CD Comment Status, Rev. 3

by William M. Miller

Excerpt:

This document summarizes the status of WG21 prior to the 2014-02 (Issaquah) meeting in addressing National Body comments on Committee Draft document N3690.

In total, 85 comments were received. To date, 41 have been accepted as proposed, 8 have been accepted with modifications, 22 have been rejected, and 14 remain to be addressed.

C++ Papers for Issaquah -- Concurrency

So I just started to read through the papers for the next C++ committee meeting in Issaquah in February, first part is about Concurrency:

C++ Papers for Issaquah -- Concurrency

by Jens Weller

From the article:

In february the C++ committee is going to meet for a week in Issaquah, it could be the final Meeting for C++14, the papers in this series will reflect both, C++14 and the standard that will come after it. Currently mostly known as C++1y. A lot of papers that are not part of C++14 will be formed into technical specifications, which some will then become C++1y later. Like the last series, I will again focus on the working groups, and post the papers sorted by the name of the working group, starting with concurrency.

Stroustrup & Sutter on C++: Session information posted

eelive.PNGThe draft session titles and descriptions have now been posted for Bjarne Stroustrup's and Herb Sutter's two-day seminar on C++:

Super C++ Tutorial: Stroustrup & Sutter on C++

EE Live!
March 31 - April 1, 2014
McEnery Convention Center
San Jose, CA, USA

We invite you to spend two insightful and informative days with C++ luminaries Bjarne Stroustrup, the creator of C++, and Herb Sutter, the chair of the ISO C++ committee, as they address the most important issues for C++ developers in 2014.

The two days are designed to cover a balanced curriculum:

  • Useful pragmatic information for C++ developers, with helpful tips and techniques whether you’ve only used C++ for a few months or are a top C++ guru. Everyone should come away with something that elicits "I didn’t know that, I can use that tomorrow!" and "I have to think about that; it just might change my work dramatically."
  • Balanced coverage of both the core language with its powerful new features, and the expanding standard library.
  • Modern techniques and best practices you can use with current compilers, together with forward-looking information about new features coming and expected to be broadly available in the next year.
  • Panels where both speakers share their insights and perspectives and answer your questions.
  • And much more, with the deep context and expertise that only these instructors can uniquely bring.

As Standard C++ continues to evolve and accelerate, this is a rare opportunity to spend time with these two world leaders of all things C++.

Below is a partial list of topics the speakers will cover.

The Essence of C++ (Bjarne Stroustrup)

C++11 is being deployed and the shape of C++14 is becoming clear. This talk examines the foundations of C++. What is essential? What sets C++ apart from other languages? How do new and old features support (or distract from) design and programming relying on this essence?

This talk focuses on the abstraction mechanisms (as opposed to the mapping to the machine): Classes and templates. Fundamentally, if you understand vector, you understand C++.

Type safety and resource safety are key design aims for a program. These aims must be met without limiting the range of applications and without imposing significant run-time or space overheads. This talk addresses issues of resource management (garbage collection is not an ideal answer and pointers should not be used as resource handles), generic programming (we must make it simpler and safer), compile-time computation (how and when?), and type safety (casts belongs in the lowest-level hardware interface). It will touch upon move semantics, exceptions, concepts, type aliases, and more. The aim is not so much to present novel features and technique, but to explore how C++’s feature set supports a new and more effective design and programming style.

C++11/14 Style (Herb Sutter)

This session will cover modern and current C++ style, focusing on C++14. It will demonstrate how major features and idioms from C++98 are now entirely replaced or subsumed and should be used no more; how other major features and idioms have been dramatically improved to the point where you code is cleaner and safer and you’ll even think in a different style; and how pervasive styles as common as variable declarations are changed forever, and not just for style but for serious technical safety and efficiency benefits. For one thing, you’ll never look at auto the same way again -- and if hearing that makes you worry, worry not, just attend the session to dig deep into the good reasons for the new reality.

Why C++14? Two reasons: First, it really does "complete C++11" with small but important consistency features like generic lambdas and make_unique that let us teach modern C++ style with fewer "except for" footnotes. Second, C++14 "is" C++ for the next several years and it’s real; it is feature-complete and in the final stages of standardization, and more importantly we are already seeing near-complete conforming implementations becoming widely available around the same time C++14 is expected to be formally published.

C++14 is a small but important improvement on C++11 that really does complete the language. What this means is that we’re going to have a complete and simpler set of idioms and styles to learn and use.

Generic Programming and Concepts (Bjarne Stroustrup)

C++ does not provide facilities for directly expressing what a function template requires of its set of parameters. This is a problem that manifests itself as poor error messages, obscure bugs, lack of proper overloading, poor specification of interfaces, and maintenance problems.

Many have tried to remedy this (in many languages) by adding sets of requirements, commonly known as "concepts." Many of these efforts, notably the C++0x concept design, have run into trouble by focusing on the design of language features.

This talk presents the results of an effort to first focus on the design of concepts and their use; Only secondarily, we look at the design of language features to support the resulting concepts. We describe the problem, our approach to a solution, give examples of concepts for the STL algorithms and containers, and finally show an initial design of language features. We also show how we use a library implementation to test our design.

So far, this effort has involved more than a dozen people, including the father of the STL, Alex Stepanov, but we still consider it research in progress rather than a final design. This design has far fewer concepts than the C++0x design and far simpler language support. The design is mathematically well founded and contains extensive semantic specifications (axioms). It is currently available as a GCC Branch and expected to be part of C++14.

A Standardization Overview (Herb Sutter)

The ISO C++ committee has transitioned to a “decoupled” model where updated versions of the standard are published more frequently, while at the same time major pieces of work can progress and be published independently from the Standard itself and delivered asynchronously in the form of Technical Specifications (TS’s) that are separate from the main Standard and can later be incorporated into the Standard.

In this session, we’ll give a summary of the new features coming in C++14 itself, and then a tour of the seven (7) near-term separate Technical Specifications already underway -- think of these as the "C++14 wave" of deliverables. The topics covered will be:

  • C++14: What’s new in the new standard due this year
  • File System TS: Portable file system access
  • Library Fundamentals TS (small): string_view and optional<>
  • Networking TS (small): IP addresses, URIs, byte ordering
  • Concepts Lite TS: Templates + constraints = ++usability and ++diagnostics
  • Array Extensions TS: Language and library dynamic arrays
  • Concurrency TS: Nonblocking futures (.then, .when_*), executors, and (maybe) await
  • Parallelism TS: A whole new Parallel STL with both parallel and vector execution support

This session will give an overview of each set of features, what it looks like and how to use it, and why it's important for the standard and for your own portable C++ code.

Making Simple Things Simple (Bjarne Stroustrup)

One aim of C++11 (and C++14) was to make simple things simple (without obstructing advanced solutions to the problems faced by experts). This talk examines the role of simple language facilities (such as auto, initializer lists, container algorithms, and range-for) in the overall picture of making C++ easier to use without compromizing generality and perfromance.

Three Cool Things in C++ Concurrency (Herb Sutter)

This session will show three cool and practical concurrency techniques drawn from Herb’s "Effective Concurrency" writing and presented in modern C++. Will there be a lock-free data structure? a technique to eliminate naked threads? a lock ordering discipline? something else? Come see.

A Design Exercise (Bjarne Stroustrup)

A language feature in isolation is boring and useless. This talk explores a set of ideals for a sample library (a simple Matrix with associated operations) and explores the implications in terms of design choices, language features used, and techniques needed.

Panels and Q&A

Each day will set aside liberal time for panel and Q&A discussion with these world-class instructors not available at any other event.

And more!

Don’t miss Stroustrup and Sutter on C++ at EE Live! in spring 2014.

C++Now 2014: Student/Volunteer Program Accepting Applications

This year, we are again inviting students with an interest in C++ to attend the May 12-17, 2014 conference in Aspen, CO as Student/Volunteers. The program is an excellent way for students with any interest in C++ to learn about C++ and make lasting connections with the C++ community.

Student/Volunteer Program Now Accepting Applications

May 12 – 17, 2014

Aspen CO, USA

C++Now 2014 Conference Website

Quick Q: How do I write string literals that contain special characters? -- StackOverflow

so-blackjack.PNGQuick A: Use raw string literals! If your compiler doesn't have them yet, nag.

The original question on SO, but note the best answer is pepper_chico's rather than the selected answer:

Only Detect Text in Quotations (C++)

I'm not great at programming and recently started to read tutorials on C++.

I decided I would attempt to make a simple blackjack program. I tried to make a title with "big text" but C++ is preventing me from doing it because it is detecting other things inside the text.

    //Start Screen Begin
cout << " ____  _            _     _            _        ";
cout << "| __ )| | __ _  ___| | __(_) __ _  ___| | __    ";
cout << "|  _ \| |/ _` |/ __| |/ /| |/ _` |/ __| |/ /    ";
cout << "| |_) | | (_| | (__|   < | | (_| | (__|   <     ";
cout << "|____/|_|\__,_|\___|_|\_\/ |\__,_|\___|_|\_\    ";
cout << "                       |__/                     ";
    //Start Screen End

This is what I am trying to display, yet keep getting the following error:

undefined reference to 'WinMain@16'

I am asking if there is a way to tell C++ I only want it to read and display the text, and not use any functions.

N3899: Nested Allocation -- 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: N3899

Date: 2014-01-20

Nested Allocation

by Lawrence Crowl

Excerpt:

Stack allocation is generally faster than heap allocation. C and C++ have exploited this speed by allocating statically-sized local variables on the execution stack. With the exception of the rather limited alloca facility, all non-statically-sized objects could only be allocated on the heap.

That is, programmers had the choice between fast-but-limited and general-but-slow.

This paper explores some of the issues when refining allocation choices.

N3897: Auto-type members -- 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 number: N3897

Date: 2014-01-20

Auto-type members

by Ville Voutilainen

Excerpt:

This paper is a record of discussion about non-static data members with deduced types, aka auto members with non-static data member initializers. Such a facility has been proposed by various people at various times, and Faisal Vali created a prototype implementation for it. This paper is NOT a proposal, this paper merely records the discussion and records the reason why Vali ultimately decided not to go further with such a proposal.

N3896: Library Foundations for Asynchronous Operations -- Christopher Kohlhoff

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

Date: 2014-01-20

Library Foundations for Asynchronous Operations

by Christopher Kohlhoff

Excerpt:

In this paper, we will first examine how futures can be a poor choice as a fundamental building block of asynchronous operations in C++. The extended std::future brings inherent costs that penalise programs, particularly in domains where C++ use is prevalent due to its low overheads. An asynchronous model based on a pure callback approach, on the other hand, allows efficient composition of asynchronous operations.

N3893-95: C++ Standard Library Issues List (Revision R86) -- 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 number: N3893-95

Date: 2014-01-20

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

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

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

by Alisdair Meredith

Excerpt:

The purpose of this document is to record the status of issues which have come before the Library Working Group (LWG) of the INCITS PL22.16 and ISO WG21 C++ Standards Committee.