August 2012

just::thread 1.8.0 released

Version 1.8.0 of just::thread was released today. just::thread is Just Software Solutions' C++11 Thread Library.

What's new:

  • The big news with this release is the new support for Microsoft Visual Studio 2012, so you can continue to take advantage of just::thread when upgrading your compiler.
  • A fix for using just::thread in a DLL on Windows XP.
  • Minor fixes and improvements to the generated code across all platforms.

Core C++, 4 of N: Virtual Functions -- Stephan T. Lavavej

Core C++, 4 of N: Virtual Functions -- Stephan T. Lavavej

Stephan T. Lavavej, aka STL, will take us on a journey of discovery within the exciting world of Core C++. We know lots of folks are either coming back to C++, coming to C++, or have never left C++. This lecture series, in n parts, is for all of you! Only STL can make that work (novice, intermediate, and advanced all bundled together and presented in a way only STL can do).

In part 4, Stephan teaches us about Virtual Functions. In parts 1-3, we learned about compile-time constructs. Now, we enter the realm of runtime. STL spends some time discussing inheritance and a bit about access control.

Tune in. Learn.

"Panel: Static If, C++11, Modern Libraries, and Metaprogramming" -- Alexandrescu, Meyers, Sutter

The first panel from C++ and Beyond 2012 is now available on Channel 9:

On Static If, C++11 in 2012, Modern Libraries, and Metaprogramming

Andrei Alexandrescu, Scott Meyers, Herb Sutter

Channel 9 was invited to this year's C++ and Beyond to film some sessions (that will appear on C9 over the coming months!)...

At the end of day 2, Andrei, Herb and Scott graciously agreed to spend some time discussing various modern C++ topics and, even better, answering questions from the community. In fact, the questions from Niners (and a conversation on reddit/r/cpp) drove the conversation.

Here's what happened...

[more]

Boost 1.51.0 released

Release 1.51.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.

This release contains 1 new library (Boost.Context, by Oliver Kowalke) and numerous enhancements and bug fixes for existing libraries.

Thanks,

--The Boost release team

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

 

User-Defined Literals, Part 1 -- Andrzej KrzemieĊ„ski

New article by Andrzej Krzemieński:

User-defined literals — Part I

This post is about the new language feature: the ability to specify user-defined literals. You may already be familiar with it, for example from N2750. In this post we will talk about literals in general, the purpose and usefulness of user-defined literals, their limitations, and alternatives in C++ to achieve similar goals.

[more]

Adobe flascc: C++ Compiler for Flash

Want to reach a billion people with your C++ program?

Flash Runtime C++ Compiler (flascc)

Bring your native C/C++ games from consoles and PCs to over a billion people on the web — across browsers, with no install. ... console-quality games with blazing fast performance across web browsers, including Chrome, Firefox, Internet Explorer, and Safari.

“Games built for high-end consoles can now run on the Web or as Facebook apps, reaching an enormous user base. This totally changes the playing field for game developers.” — Tim Sweeney, Founder, Epic Games

“The Flash Player version of Unreal Tournament 3 turned out to look even better than the version we shipped on Xbox 360 and PlayStation 3.” — Mark Rein, Vice President, Epic Games

Where To Get the Standard (and Drafts)

I'm not calling out all the changes we're making as we gradually add information to the site, but here's a new page many people will find useful...

The Standard: "Want to read the standard, or working drafts of the standard? You have several options, most of them free." This page summarizes:

  • where to get the current standard (official for $30, or almost-official for free);
  • where to get working drafts (prebuilt or at GitHub); and
  • what to expect, that the standard is a treaty, not a tutorial.

Enjoy!

Destructors That Throw: Evil, or Just Misunderstood? -- Jon Kalb and Dave Abrahams

Interesting new C++Next article about destructors that throw:

Evil, or Just Misunderstood?

by Jon Kalb and Dave Abrahams

From the script-style intro:

UDT (putting down drink and looking deep into CODER’s eyes): By the way, in my destructor I throw if the file fails to close properly.

CODER: I can live with that. [...] I’ve always been a sucker for dangerous types.

FADE TO BLACK

NARRATOR (V.O.): We invite you to journey with us now, into the heart of darkness, where we seek out throwing destructors and stare Evil™ in the face. Will CODER survive his encounter with exceptional destruction? The answers lie beyond the frontiers of usual best practice…

Continue reading...

C++11 Style: A Touch of Class -- Bjarne Stroustrup

Bjarne Stroustrup will be appearing live next month to deliver his popular talk on what "Modern C++" should mean in the 2010s.

C++11 Style: A Touch of Class
Bjarne Stroustrup

Date: September 19, 2012
Time: 6:30pm
Location: Austin, TX, USA 

We know how to write bad code: Litter our programs with casts, macros, pointers, naked new and deletes, and complicated control structures. Alternatively (or in addition), obscure every design decision in a mess of deeply nested abstractions using the latest object-oriented programming and generic programming tricks. For good measure, complicate our algorithms with interesting special cases. Such code is incomprehensible, unmaintainable, usually inefficient, and not uncommon.

But how do we write good code? What principles, techniques, and idioms can we exploit to make it easier to produce quality code? I will make an argument for type-rich interfaces, compact data structures, integrated resource management and error handling, and highly-structured algorithmic code. I will illustrate my ideas and motivate my guidelines with a few idiomatic code examples.

I will use C++11 freely. Examples include auto, general constant expressions, uniform initialization, type aliases, type safe threading, and user-defined literals. C++ features are only just starting to appear in production compilers, so some of my suggestions have the nature of conjecture. However, developing a “modern style” is essential if we don’t want to maintain newly-written 1970s and 1980s style code in 2020.

This presentation reflects my thoughts on what “Modern C++” should mean in the 2010s: a language for programming based on light-weight abstraction with a direct and efficient mapping to hardware, suitable for infrastructure code.