Top 15 C++ Exception handling mistakes and how to avoid them--Deb Haldar

This article changed my vision about exceptions:

Top 15 C++ Exception handling mistakes and how to avoid them

by Deb Haldar

From the article:

Do you use exception handling in your C++ code?

If you don’t, why not?

Perhaps you’ve been conditioned to believe that exception handling is bad practice in C++. Or maybe you think that it’s prohibitively expensive in terms of performance. Or maybe it’s just not the way your legacy code is laid out and you’re stuck in the rut.

Whatever your reason is, it’s probably worth noting that using C++ Exceptions instead of error codes has a lot of advantages. So unless you’re coding some real-time or embedded systems, C++ exceptions can make your code more robust, maintainable and performant in the normal code path (yes performant, you read that right !).

In this article we’re going to look at 15 mistakes that a lot of developers make when just stating off with C++ exceptions or considering using C++ exceptions...

CppCon 2015 Templator: Demo of a nice tool for Visualizing Template Instantiations--Peter Sommerlad

Have you registered for CppCon 2016 in September? Don’t delay – 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:

Templator: Demo of a nice tool for Visualizing Template Instantiations

by Peter Sommerlad

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Many C++ beginners shy away from employing templates in their code, because of the myth of templates being hard. Even seasoned C++ developers can have problems manually interpreting template code correctly as Olve Maudal's C++ pub quiz demonstrates. Overloads and template specializations make it hard for programmers and also IDEs to show a developer what happens without compiling a program and even with a compile one might not get, what actually happens unless an unintelligible error message from your compiler appears.

My students tried to alleviate that problem by visualizing template instantiation and overload selection in a C++ IDE and allow to navigate through template code in instantiation context that a compiler would only create internally and that is otherwise not available for humans. While still in its nascent state I hope to show what is possible and if things go as planned at the time of the submission you should be able to solve the template pub quiz questions without running the programs.

How C++14 and C++17 help to write faster (and better) code. Real world examples -- Dan Levin

High-performance code and new standards of C++ with code examples.

How C++14 and C++17 help to write faster (and better) code. Real world examples

by Dan Levin

From the article:

Writing high performance code is always a difficult task. Pure algorithms are not always a good fit for the real world architectures.

Often, we’re limited to just two options: either beautiful and slow or fast and ugly.

In this article I’ll show when C++11 and C++14 can help to write fast, compact and well-structured code.

CppCon 2016 Call for Volunteers

CppCon is recuiting volunteers.

Call for Volunteers

for CppCon 2016

From the call:

We need people to help assemble registration packets and badges, register attendees, assist speakers with Audio/Video, and in general be on hand to make things run smoothly. In exchange, we’ll see to it that you’ll spend at least half of your time in sessions.

 

CppCon 2015 Programming with less effort C++: Measuring the programming effort...--Sylvain Jubertie

Have you registered for CppCon 2016 in September? Don’t delay – 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:

Programming with less effort C++: Measuring the programming effort with metrics

by Sylvain Jubertie

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

The C++ language and libraries propose different ways to implement codes. For example, using explicit loops or STL algorithms to traverse containers and process data. C++11&14 bring also new features to the C++ language aimed at simplifying the writing of codes. But what is the gain we can expect in term of development effort when using these different possibilities and features ? or, as a developer may ask himself: Is it viable for me to spend some time learning new C++ libraries or standards to provide less effort/spend less time on my future codes ?

Before answering these questions, we must give a definition of the development effort, and define a way to measure it. Thus, we first propose to describe existing software metrics, from the simple Single Line Of Code (SLOC) to the more complex Halstead metrics, then to implement them in an automatic tool based on Clang tools, and finally to apply them on several codes to compare their respective development efforts.

First results show that using modern C++ features like auto, decltype and lambdas help to dramatically reduce the development effort. These results may help to convince developers to use new C++ features, or to port their codes from old standards to new ones, or even switch from other languages to C++ !

[C++17] Structured Bindings - Convert struct to a tuple (simple reflection)

An interesting piece of code!

[C++17] Structured Bindings - Convert struct to a tuple (simple reflection)

From the article:

Very simple approach to convert any struct (up to N members) to a tuple using C++17 structured bindings and the idea from Boost.DI (http://boost-experimental.github.io/di/cppnow-2016/#/7/11) used to detect type constructor traits.

CppCon 2015 `for_each_argument` explained and expanded--Vittorio Romeo

Have you registered for CppCon 2016 in September? Don’t delay – 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:

`for_each_argument` explained and expanded

by Vittorio Romeo

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

During January 2015, Sean Parent posted a very interesting short piece of code on Twitter. The code iteratively iterates at compile-time over any number of function arguments, forwarding them one by one to a callable object.

How does this code work? What are the possible use cases? Can we make it even more generic and useful?

My talk answers all of the questions above, using independently compiled chronologically sequential code segments that show the audience the analysis and improvement process of `for_each_argument`.

Range-v3 on MSVC -- Eric Mittelette

The Visual C++ Team is delighted to announce that they just published a range-v3 implementation.

Range-v3 on MSVC is Available on GitHub

by Eric Mittelette

From the article:

This contribution comes hot on the heels of our recent work to improve expression SFINAE on our Visual Studio 2015 Update 3 VC++ compiler . This is the first implementation of the Range TS running in MSVC. In “Ranges for the Standard Library, Revision 1” (N4128) Ranges are defined like this: “A range is an object that refers to a sequence of elements, conceptually similar to a pair of iterators. One prime motivation for ranges is to give users a simpler syntax for calling algorithms.