June 2016

Talks at Meeting C++ 2016

Most talks of this years Meeting C++ conference are now online:

Talks at Meeting C++ 2016

by Jens Weller

The top 7 Talks chosen by the voting:

Exploring C++17 and beyond
C++ Static Analysis
Functional reactive programming in C++
C++ Core Guidelines: Migrating your Code Base
Want fast C++? Know your hardware!
The memory model in C++
Implementing `static` control flow in C++14

CppCon 2015 C++ for cross-platform VR--Nicolas Lazareff

Have you registered for CppCon 2016 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2015 for you to enjoy. Here is today’s feature:

C++ for cross-platform VR

by Nicolas Lazareff

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

This talk is an overview of how C++ can be used to quickly create cross-platform virtual reality experiences while sharing one codebase.

To support all major vendors, a VR experience has to span not only across operating systems, but also device types, hardware specs, manufacturers, and SDKs -- and so pitfalls and learnings from shipping on Oculus mobile and desktop, Google Cardboard, and soon Sony's Morpheus will be discussed.

We'll cover networking, graphics, SDK wrappers, and even abstracting language oddities (Android's Java layer for Oculus mobile).

CppCast Episode 60: Visual C++ Conformance with Andrew Pardoe

Episode 60 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Andrew Pardoe to discuss Visual C++ conformance progress as well as experimental features like Modules.

CppCast Episode 60: Visual C++ Conformance with Andrew Pardoe

by Rob Irving and Jason Turner

About the interviewee:

Andrew started working at Microsoft in 2002. He worked for the C++ team for exactly five years, first on testing the Itanium optimizer and then on the Phoenix compiler platform. He left in 2007 to become a PM on the CLR team (the C# runtime). Andrew left that job about two years ago and through the magic of corporate reorgs ended up as the C++ compiler PM.

In his role at Microsoft Andrew pays attention to pretty much everything without a GUI: the compiler front end/parser, code analysis, and a little bit to the optimizer. He also owns the tools acquisition story—such as the VC++ Build Tools SKU and updating to latest daily drops through NuGet—and Clang/C2. The Clang/C2 work is what ties Andrew into the Islandwood team, and the code analysis work focuses mostly on the C++ Core Guidelines checkers.

CppCon Early Bird Registration: Two weeks left

cppcon-093.PNG Have you registered yet for CppCon 2016? With 93 days to go before the event, we have more attendees already registered than ever before at this point before the conference. They got the Early Bird discount, and so can you for another two weeks.

In addition to 5 great keynote and plenary talks, you'll enjoy 100+ of the top C++ sessions in the world -- the program committee has been sorting through some 200 session submissions and will soon announce their selection of this year's "100+ best of 2016" that will be accepted for the event. CppCon also offers two-day pre-conference classes, panels, poster sessions, lightning talks, and much more. New this year: an exhibitors' area where you can see and try the latest C++ tools and libraries. And of course, as always, a huge part of the event is the week-long interaction with fellow attendees, making CppCon the best learning and networking opportunity for C++ developers across all industries and disciplines in a relaxed and inviting festival atmosphere.

To see what others have had to say about CppCon, check out the attendee video, featuring a soundtrack of original music written and performed by the CppCon house band. And check out the video archive of 2014 and 2015 talks on YouTube and on Channel 9.

CppCon is "the" C++ event of the year. Early Bird registration closes on July 1. If you haven't registered yet, register today!

Enabling forward traversal -- Krzysztof Ostrowski

Krzysztof Ostrowski describes in his article enabling iteration over a sequence of objects of given type without changing the type name itself.

Enabling forward traversal

by Krzysztof Ostrowski

From the article:

Let's consider following example. We have legacy interface that constructs object of type T using information stored in object of type U:

bool build_from(T& into, const U& from);

Such a build_from can be deserialiser function, e.g. from JSON to C++ type, for example:

result_type deserialise(T& into, const json_node_type& from);

Ideally, we should return into rather than taking it as an input argument, i.e. return optional<T> or type that carries information about the errors too, like C++ counterpart of Either. Unfortunately, we have to deal with legacy interafce, so that existing contracts cannot be broken, and our patch sets shall favour composition and extension over the modification.

With deserialise we know how to convert internal JSON representation into object of type T. That works fine for non-structured types. JSON offers associative containers (dictionaries, hashes, structures as defined in YAML) and collections. Dictionaries map easily to product types, struct in C++, and for those we typically need custom deserialisation procedures. Collections may be seen as abstractions over structures, or – more functionally – as sequenced values of type T for collection of type [T]. Since we know how to deserialise objects of type T, we can deserialise [T] by simply mapping deserialise over a sequence of T objects, that is doing forward traversal. Unfortunately we have just one JSON node from, not a sequence of nodes. We need to enable forward traversal for the type json_node_type with minimal number of changes.

Qt 5.7 released--Lars Knoll

The new Qt has arrived!

Qt 5.7 released

by Lars Knoll

From the article:

I’m very happy to announce that Qt 5.7 is now available. It’s been only 3 months since we released Qt 5.6, so one might expect a rather small release with Qt 5.7. But apart from the usual bug fixes and performance improvements, we have managed to add a whole bunch of new things to this release.

Quick Q: Do mutexes guarantee ordering of acquisition?

Quick A: They do not.

Recently on SO:

Do mutexes guarantee ordering of acquisition?

Known problem. C++ mutexes are thin layer on top of OS-provided mutexes, and OS-provided mutexes are often not fair. They do not care for FIFO.

The other side of the same coin is that threads are usually not pre-empted until they run out of their time slice. As a result, thread A in this scenario was likely to continue to be executed, and got the mutex right away because of that.