News

New site feature: Suggest an article

This site hosts a curated blog that provides pointers to the best and latest content in the world on modern Standard C++. From links to fresh new articles and books, to product news, to useful videos and events, to (of course) news about the standardarization process itself, we want you to be able to find out about it from here.

We want to link to all high-quality C++ content. But how can we make sure we don't miss something good? The blog editors know about a lot of the latest news and content, but no one person or small group can catalog it all, and we don't want to miss anything that C++ developers might find good and useful.

You can help. It's easy, and here's how.

Have you recently come across a high-quality article? a useful video? an upcoming event? cool product news? or something else likely of interest to a large subset of C++ developers? Then let us know using a cool new feature of the site: The "Suggest an Article" link available at the top right of the screen whenever you're logged into the site. (If you don't have a login, it's easy to get one: Registration is free.)

When you click on the Suggest link, you'll be taken to a screen that looks something like this. Here, you can write a draft blog post for the Blog Editors' consideration:

  • Enter a title, and the URL people should be taken to.
  • Pick an appropriate category.
  • Write a body that lets people know what it's about and why they should read/watch/follow the link.

As a guide, follow the style of existing blog posts already on this site. If you're curious, you can also check out the isocpp.org style guide used by our own editors; a subset of those features are available to you when writing blog suggestions.

You can make multiple suggestions and track their status via the Your Suggestions box on the right side of the suggestion page.

We can't accept all suggestions; some will be duplicates, others may not be deemed to be of wide enough interest to C++ developers. But many suggestions will be accepted -- if your post is accepted, the editors will edit it to tighten it up and conform to our style guide, and post it live for the world to see and appreciate with your name in the byline as the author of the blog post. If that happens to your suggestion, congratulations -- that's your name up there in bright lights on the home page of isocpp.org!

A few of you already found the Suggest link, and so we're happy to report that the very first user blog post suggestion by Blair Davidson went live today. Thanks, Blair, and thanks in advance to all who will help us find and link to the best high-quality C++ content in the world.

C++ Questions and Answers -- Herb Sutter

This blog post was suggested by Blair Davidson. The video is from summer 2011, shortly before the C++11 standard was ratified:

Herb Sutter: C++ Questions and Answers

Jun 07, 2011

Herb's [previous] appearance on C9 was a relatively short chat with me about C++0x. You wanted more questions asked and some of you thought I was just too soft on Herb. Well, Herb decided that the best way to get the questions you want asked is, well, to have you ask them. Most of the highest user-rated questions were asked and Herb answers with his usual precision. So, without further ado, it's C++ question and answer time with Herb Sutter, powered by you.

Continue reading...

scope(exit) in C++11

A C++ note in passing from an indie game developer. He notes that Boost has a similar feature already (see the BOOST_SCOPE_EXIT macros and discussion of alternatives) but likes that you can write the basic feature yourself in under 10 lines, have it work like a statement instead of a BEGIN/END macro pair, and use it with other C++11 features like lambdas.

scope(exit) in C++11

I really like the scope(exit) statements in D. They allow you to keep the cleanup code next to the initialization code making it much easier to maintain and understand. I wish we had them in C++.

Turns out this can be implemented easily using some of the new C++ features...

Continue reading...

Storage Layout of Polymorphic Objects -- Dan Saks

It's great to see Dan writing about C++ again. Here's his latest today, in Dr. Dobb's:

Storage Layout of Polymorphic Objects

By Dan Saks

Adding at least one virtual function to a class alters the storage layout for all objects of that class type.

Adding at least one virtual function to a class alters the storage layout for all objects of that class type. In this article, I begin to explain how C++ compilers typically implement virtual functions by explaining how the use of virtual functions affects the storage layout for objects.

Continue reading...

(Not) Using std::thread -- Andrzej KrzemieĊ„ski

Andrzej Krzemieński writes:

(Not) using std::thread

This post is about std::thread but not about threads or multi-threading. This is not an introduction to C++ threads. I assume that you are already familiar with Standard Library components thread and async.

I encountered a couple of introductions to C++ threads that gave a code example similar to the one below:

void run_in_parallel(function<void()> f1, function<void()> f2)

{

    thread thr{f1}; // run f1 in a new thread

    f2();           // run f2 in this thread

    thr.join();     // wait until f1 is done

}

While it does give you a feel of what thread’s constructor does and how forking and joining works, I feel it does not stress enough how exception-unsafe this code is, and how unsafe using naked threads in general is. In this post I try to analyze this “safety” issues...

Continue reading...

SG4 (Networking) wiki online

Study Group 4 (SG4), which focuses on Networking topics, now has a wiki on GitHub for those who want to follow its work and near-term deliverables.

The link is also available via SG4's entry in the SG list on The Committee page.

Please contact the SG4 chair, Kyle Kloepper, for further information.

Reactive Extensions (Rx) now supports LINQ in C++, goes open source

Reactive Extensions (Rx) is now open source and supports LINQ styles in C++.

From the announcement, Rx is already being used for a number of highly responsive applications including GitHub for Windows:

According to Paul Betts at GitHub, "GitHub for Windows uses the Reactive Extensions for almost everything it does, including network requests, UI events, managing child processes (git.exe). Using Rx and ReactiveUI, we've written a fast, nearly 100% asynchronous, responsive application, while still having 100% deterministic, reliable unit tests. The desktop developers at GitHub loved Rx so much, that the Mac team created their own version of Rx and ReactiveUI, called ReactiveCocoa, and are now using it on the Mac to obtain similar benefits."

In addition to Rx's original support for .NET and new support for Javascript, Rx has also added support for C++:

Rx++: The Reactive Extensions for Native (RxC) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C and C++.

Ix++: An implementation of LINQ for Native Developers in C++.

Where to download or find out more: https://rx.codeplex.com/

Meeting C++ 2012: European C++ users group meeting

C++ continues to heat up with new conferences! Europeans now have something similar to C++ Now (formerly BoostCon), one organized and hosted by Europeans, but open to anyone:

Meeting C++ 2012

Nov 9-10, 2012, Düsseldorf/Neuss, Germany

Meeting C++ is being held with the collaboration of C++ Users Groups from Dusseldorf, Berlin, and Belgium. The inaugural conference already has over 175 attendees registered, and a rich talk list of current C+ topics. WG21's own Michael Wong will give a keynote on Good C++ Coding Style.

Boost 1.52.0 released

Release 1.52.0 of the Boost C++ Libraries is now available.

These open-source libraries work well with the C++ Standard Library, and are usable across a broad spectrum of applications. The Boost license encourages both commercial and non-commercial use.

Releases 1.51.0 and 1.52.0 contain one new library (Boost.Context, by Oliver Kowalke) and numerous enhancements and bug fixes for existing libraries.

Here are some useful links for 1.52.0.

Many thanks to the Boost release team:

    Beman Dawes
    Daniel James
    Eric Niebler
    Marshall Clow
    Rene Rivera
    Vladimir Prus

We very much appreciate their continued hard work.

The Future of C++ -- Herb Sutter

Yesterday, many thousands of you were in the room or live online for Herb Sutter's talk, now available online:

The Future of C++

Herb Sutter
November 2, 2012

From Herb's video announcement summary:

This has been a phenomenal year for C++, since C++11’s publication just 12 months ago. And yesterday was a great day for C++.

Yesterday I had the privilege of announcing much of what Microsoft and the industry have been working on over the past year.

(minor) C++ at Microsoft

On September 12, we shipped VC++ 2012 with the complete C++11 standard library, and adding support for C++11 range-for, enum class, override and final. Less than two months later, yesterday we announced and shipped the November 2012 CTP, a compiler add-in to VC++ 2012 adding C++11 variadic templates, uniform initialization and initializer_lists, delegating constructors, function template default arguments, explicit conversion operators, and raw string literals. Details here, and download here.

Note that this is just the first batch of additional C++11 features. Expect further announcements and deliveries in the first half of 2013.

(major) C++ across the industry

Interest and investment in C++ continues to accelerate across the software world.

  • ISO C++ standardization is accelerating. Major companies are dedicating more people and resources to C++ standardization than they have in years. Over the next 24 months, we plan to ship three Technical Specifications and a new C++ International Standard.
  • C++ now has a home on the web at isocpp.org. Launched yesterday, it both aggregates the best C++ content and hosts new content itself, including Bjarne Stroustrup’s new Tour of C++ and Scott Meyers’ new Universal References article.
  • We now have a Standard C++ Foundation. Announced yesterday, it is already funded by the largest companies in the industry down to startups, financial institutions to universities, book publishers to other consortia, with more members joining weekly. For the first time in C++’s history since AT&T relinquished control of the language, we have an entity – a trade organization – that exists exclusively to promote Standard C++ on all compilers and platforms, and companies are funding it because the world runs on C++, and investing in Standard C++ is good business.

This is an exciting time to be part of our industry, on any OS and using any language. It’s especially an exciting time to be involved with C++ on all compilers and platforms.

Thank you all, whatever platform and language you use, for being part of it.

Links: