C++ Comma Operator—Ivan Sanz

It needs to be used carefully, but has its uses.

C++ Comma Operator

by Ivan Sanz

From the article:

Comma operator has been with us for a long time. First seen in C spec and improved with custom overloads in C++, it quickly became one of those hidden things you shouldn’t use.
Most C/C++ books avoid speaking about goto the same way they do about comma operator. This is not fair, as both of them can be used properly on certain cases. Let’s speak about that...

C++ Weekly Episode 96: Transparent Lambda Comparators—Jason Turner

Episode 96 of C++ Weekly.

Transparent Lambda Comparators

by Jason Turner

About the show:

In this episode Jason explores the use of lambdas as comparators for the associative containers. Just how far can we take the use of lambdas? Variadic templates, forwarding references, multiple inheritance, variadic "using" declarations, local classes, transparent comparators and direct base class initialization are all utilized in this video.

Red Hat at the ISO C++ Standards Meeting (Nov 2017): Parallelism and Concurrency—Torvald Riegel

Discover how C++ evolves:

Red Hat at the ISO C++ Standards Meeting (November 2017): Parallelism and Concurrency

by Torvald Riegel

From the article:

Several Red Hat engineers attended the JTC1/SC22/WG21 C++ Standards Committee meetings in November 2017. This post focuses on the sessions of SG1, the study group on parallelism and concurrency. SG1 had a full schedule as usual, with Executors, Futures, and deferred reclamation mechanisms (e.g., RCU) being major discussion topics. We also started to track the state of proposals and topics we will need to discuss in a publicly accessible bug tracker...

Your own type predicate—Andrzej Krzemieński

A very detailled and complete article to start playing with template predicates!

Your own type predicate

by Andrzej Krzemieński

From the article:

In this post we will see how to define a type trait or a type predicate or a meta-function that would allow us to check at compile time whether a type exposes an interface that we need. That is, we want to check if a given type T has:

  • nested typename result_type,
  • static member function set_limit that takes one argument of type int,
  • member function get_result that returns type const result_type& and that is declared not to throw exceptions...

The Boost C++ Master Class with Boris Schäling

Boris Schäling offers a new C++ master class.

The Boost C++ Master Class

by Boris Schäling

About the training:

Welcome to a 2-day training that strives to deepen your understanding of the Boost C++ Libraries. As of today, the Boost C++ Libraries are the most important stepping stone if you want to increase your productivity as a C++ developer and significantly improve the quality of your code. In-depth knowledge of the Boost C++ Libraries empowers you to write code that is shorter, more expressive, less error-prone, more agile, and more future proof.

Boris Schäling is one of the world’s leading professional Boost C++ expert. He has seen multiple times how detailed knowledge of the Boost C++ Libraries can turn a C++ developer into an exceptional C++ developer. Boris Schäling is an active member of the Boost community. He is the author of the book "The Boost C++ Libraries" and responsible for the website

The training is for intermediate and advanced C++ developers. Advantage if you have some experience with the Boost libraries (prior knowledge of Boost helpful, but not required).

Don’t miss out on the opportunity to attend this 2-day course, to be held in Stockholm on the 13th-14th March, 2018. Please notice there are a limited number of seats.

C++ Coroutines: Understanding operator co_await—Lewis Baker

An article very complete!

C++ Coroutines: Understanding operator co_await

by Lewis Baker

From the article:

In the previous post on Coroutine Theory I described the high-level differences between functions and coroutines but without going into any detail on syntax and semantics of coroutines as described by the C++ Coroutines TS (N4680).

The key new facility that the Coroutines TS adds to the C++ language is the ability to suspend a coroutine, allowing it to be later resumed. The mechanism the TS provides for doing this is via the new co_await operator.

Understanding how the co_await operator works can help to demystify the behaviour of coroutines and how they are suspended and resumed. In this post I will be explaining the mechanics of the co_await operator and introduce the related Awaitable and Awaiter type concepts.

But before I dive into co_await I want to give a brief overview of the Coroutines TS to provide some context...

Implementing the spaceship operator for optional—Barry Revzin

The future implementation?

Implementing the spaceship operator for optional

by Barry Revzin

From the article:

Last week, the C++ Standards Committee added operator<=>, known as the spaceship operator, to the working draft for what will eventually become C++20. This is an exciting new language feature for two reasons: it allows you to write one function to do all your comparisons where you used to have to write six, and it also allows you to write zero functions — just declare the operator as defaulted and the compiler will do all the work for you! Exciting times...

Keynotes at Meeting C++ 2017

With the conference just a few weeks away, an update on the 3 awesome keynotes of this years Meeting C++:

Keynotes at Meeting C++ 2017

by Jens Weller

From the article:

Are you excited for Meeting C++ 2017?!? I quickly wanted to give an update on the 3 keynotes at the conference this year! Each day will feature one keynote, where the first two are in the morning, while the Closing Keynote is kind of the last thing to happen before the closing message. Also, all 3 keynote speakers have now (finally) their speaker profile.

CppCon 2017: What Has My Compiler Done for Me Lately? Unbolting the Compiler’s Lid—Matt Godbolt

The CppCon 2017 endnote is now available! What an excellent talk by Matt, of Godbolt fame.

What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid

by Matt Godbolt

From the article:

In 2012, Matt and a colleague were arguing whether it was efficient to use the then-new-fangled range for. During the discussion a bash script was written to quickly compile C++ source and dump the assembly. Five years later and that script has grown into a website relied on by many to quickly see the code their compiler emits, to compare different compilers' code generation and behaviour, to quickly prototype and share code, and investigate the effect of optimization flags.

In this talk Matt will not only show you how easy (and fun!) it is to understand the assembly code generated by your compiler, but also how important it can be. He'll explain how he uses Compiler Explorer in his day job programming low-latency trading systems, and show some real-world examples. He'll demystify assembly code and give you the tools to understand and appreciate how hard your compiler works for you.

He'll also talk a little about how Compiler Explorer works behind the scenes, how it is maintained and deployed, and  share some stories about how it has changed over the years. By the end of this session you'll be itching to take your favourite code snippets and start exploring what your compiler does with them.