News

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.

C++ in 2014 -- Jens Weller

From new C++ user groups springing up across Europe and upcoming conferences, to the Boost refactoring and (of course) C++14, Jens Weller has a nice piece previewing some of the things to look forward to for C++ in 2014.

C++ in 2014

by Jens Weller

Note that Jens' list is not complete, but it gives a pretty good overview of what's coming up in the near term with a few more things to be added later.

A small teaser from the article:

I already know that there are new C++ User Groups in Aachen, Dortmund, Heidelberg and Munich in Germany, also a Russian C++ User Group is now meeting in St. Petersburg and Moscow. I think a few others will follow...

 

Quick Q: Should "property get" functions be noexcept? -- StackOverflow

Quick A: Maybe, but it generally commits you to exposing the internal type (can't change representation).

Recently on SO:

Should I use noexcept for getters always?

Should I use noexcept method modifier for getters always in C++11?

I mean simple getters here that just return members. At least in all my getters I have here an exception can't possibly be thrown. One downside is that a getter gets too verbose:

const std::string& getName() const noexcept{ return name; }

The good side as pointed out in Stroustrup's book is that the compiler might do some optimizations here and there.

Two Full Days of C++11 for C++ Programmers -- Michael Caisse & Jon Kalb (Mar 25-26, San Francisco)

codestarssummit14.PNGMichael Caisse and Jon Kalb will be conducting a two-day training class on C++11 in San Francisco in March as part of the Code Stars Summit event.

Two Full Days of C++11 for C++ Programmers

Instructors: Michael Caisse and Jon Kalb

March 25-26

San Francisco, CA, USA

From the announcement:

C++11 introduces a lot of new tools for writing code that is expressive, but continues the C++ tradition of uncompromised performance. If you are comfortable with C++, but need to get up to speed with the language and library extensions offered by C++11 this is your opportunity to learn the latest in C++ from some of the best instructors available.

Topics covered include:

  • Move semantics, rvalues, and perfect forwarding
  • Lambda expessions
  • New smart pointers
  • Tuples
  • Range-based for loops
  • Variadic templates
  • Standard function and bind
  • auto and decltype
  • Initializer lists
  • Uniform initialiation
  • constexpr
  • Delegating constructors
  • Defaulted and deleted member functions
  • explicit and final
  • nullptr

Prerequisites:

No knowledge of C++11 is assumed, but basic familiarity with C++ is assumed. It isn’t necessary that students be able to write templates or operator overloads unassisted, but they need to be able to follow examples of such code, or they are likely to fall behind.

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)