October 2021

CppCon 2021 Keynote: Small Inspiration -- Michael Caisse

michael_lab_glasses_2-200x300.jpgAnother keynote to look forward to on-stage in Aurora, CO, USA, and livestreamed to online attendees:

CppCon 2021 Keynote: Small Inspiration -- Michael Caisse

From the announcement:

We’ve previously announced keynotes by Bjarne Stroustrup, Herb Sutter, and Lisa Lippincott. This is the fourth of our six conference keynotes to be announced.

We’re happy to announce: Michael will be in Aurora live, in person to deliver a brand-new talk about inspiring and being inspired by the embedded world around us.

Michael Caisse started using C++ with embedded systems over 30 years ago. He continues to be passionate about combining his degree in Electrical Engineering with elegant software solutions and is always excited to share his discoveries with others.

Here is his talk description:

Less than 1% of microprocessors sold each year find their way into general purpose computers. Desktops, laptops, and servers of all sizes represent a very small fraction of the compute that surrounds us. We interact with a few of these systems but most go unnoticed. These invisible, unsung embedded devices offer lessons in engineering at all scales and can provide inspiration to seasoned practitioners and future technologists.

Join me as we learn from the embedded world and become inspired to inspire.

This talk is the Keynote talk for the Embedded Track.

Cppcon 2021 Embracing PODs Safely Until They Die--Alisdair Meredith and Nina Ranns

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2021 to attend in person, online, or both!

Embracing PODs Safely Until They Die

Thursday, October 28 • 10:30am - 11:30am

by Alisdair Meredith and Nina Ranns

Summary of the talk:

How do you change the active member of a union? Can you copy an object without
a publicly callable copy constructor? Can you pass classes having private data to
a function implemented in C? What is the use case for the library type trait
`std::is_trivially_move_assignable`? All these questions and more will be answered
in this session.

PODs --- Plain Old Data --- are neither plain nor old in C++11, and continued to
evolve in every published standard since, until they were finally banished in C++20.
In researching the deconstruction of PODs for the upcoming book, "Embracing
Modern C++ Safely" Alisdair Meredith (and the other authors including John
Lakos, Vittorio Romeo, and Rostislav Khlebnikov) discovered that many of the
intuitive properties and capabilities of trivial and standard layout types did not
behave quite as expected, and there are many subtleties waiting to catch the
unwary. Nina Ranns, as an active member of the Core working group, stepped in
to explain and resolve many concerns, while pointing out further bad assumptions.
Together they will present the use cases, pitfalls, and annoyances of these features
as now properly understood, giving a flavor of the presentation style of each of the
57 C++11/14 features presented in the book.

Compiler Explorer with Cmake--Gajendra Gulgulia

New capabilities.

Compiler Explorer with Cmake

by Gajendra Gulgulia

From the article:

Compiler explorer has been one of the most widely used online tool for compiling C++ code, doing experiment with C++ features, sharing code snippets with friends and colleagues and also (my favorite feature) to compare and prove with the help of assembly code why a certain way of coding might be good or bad compared to another way.
Recently compiler explorer added support for compiling multiple files with CMakeLists.txt [1] . This opens up a new possibilities for developers around the world from testing complex pieces of code to testing the compilation behavior of the same.
In this issue, I would like to give a walk through on how to set up a simple layout of three files compiled with CMakelists.txt. Note that the focus is on setting up compiler explorer for multiple files and not on code efficiency. Also the article might at first glance look lengthy, but it may only be due to 19 images in the tutorial. So don’t get weighed down by the size of the article and lets start!

A Recap on User Defined Literals--Jonathan Boccara

Are you using them?

A Recap on User Defined Literals

by Jonathan Boccara

From the article:

User defined literals were introduced in C++11, evolved in C++14 and C++17, and are a nice way to write more expressive code.

The general idea behind user defined literals is that they allow to write a value and tack on a term describing what this value represents. For example:

auto const quantity = 42_bottles_of_water;

In this expression, 42 is the value and _bottles_of_water is the user defined suffix. The expression as a whole is a user defined literal.

A common usage of user defined literals is to represent units, but they can also be used to add meaning to values in more general contexts.

Here is how to write user defined literals in C++11, C++14 and C++17...

Detecting errors in the LLVM release 13.0.0

Commercial static analyzers perform deeper and fuller code analysis compared to compilers. Let's see what PVS-Studio found in the source code of the LLVM 13.0.0 project.

Detecting errors in the LLVM release 13.0.0

by Andrey Karpov

From the article:

It makes no sense to write different values one by one to the same variable. This is exactly what the analyzer warns us about. The code author made a typo, forgetting to add '|'. This code should create one 64-bit value from two 32-bit values. The correct code looks as follows: ....

Cppcon 2021 What You Can Learn from Being Too Cute: Why You Should Write Code That...--Daisy Hollman

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2021 to attend in person, online, or both!

What You Can Learn from Being Too Cute: Why You Should Write Code That You Should Never Write

Friday, October 29 • 1:30pm - 2:30pm

by Daisy Hollman

Summary of the talk:

During the COVID-19 global pandemic, as we all searched for ways to stay connected to the C++ community, I innocently started posting short, 25-line or less C++ snippets of counterintuitive C++ code that I called my "Cute C++ trick of the day." I was floored by the amount of attention these tweets received, with some being viewed more than 30,000 times and liked or retweeted hundreds of times. I received repeated requests to collect these tricks into a library or talk, and this is that talk.

In this presentation, I will dissect a few of my most popular "Cute C++ tricks" to a level of detail not possible on social media platforms like Twitter. I'll talk about how and why these tricks work the way they do, talk about the dark corners of C++ they touch upon, and talk about what you should actually do if you need to produce the same effect in production code. While not targeted at beginners, these tricks span the gauntlet from features that most intermediate programmers are aware of (but never thought to use in a particular way) to dark corners of the language that many of my C++ committee colleagues were surprised to learn about. Throughout it all runs a common thread: learning how to exploit your own curiosity to expand your toolbox, gain a better grasp of the fundamentals of C++, and ultimately, become a better programmer.

CppCon 2021 Keynote: Value in a Procedural World -- Lisa Lippincott

LisaLippincott-300x209.jpegLive in Aurora, CO, USA:

CppCon 2021 Keynote: Value in a Procedural World -- Lisa Lippincott

From the announcement:

We’ve previously announced keynotes by Bjarne Stroustrup and Herb Sutter... We’re happy to announce: Lisa Lippincott will be in Aurora live, in person to deliver a brand-new talk about a fundamental basis of understanding computer programs.

Lisa Lippincott designed the software architectures of Tanium and BigFix, two systems for managing large fleets of computers. She is chair of the numerics study group of the C++ standardization committee...

Cppcon 2021 A (Short) Tour of C++ Modules--Danila Kutenin

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2021 to attend in person, online, or both!

A (Short) Tour of C++ Modules

Tuesday, October 26 • 3:15pm - 4:15pm

by Danila Kutenin

Summary of the talk:

Once you decide to start a big project or a company, it eventually comes down to unifying the build infrastructure. However, hundreds and thousands of compilation units are extremely difficult to maintain to achieve the highest possible performance. Contrary to the belief that you should always trust your compiler, recent micro-architectural breakthroughs from merging two arrays with special instructions to JSON parsing through SIMD showed that compilers are far from understanding every single piece of code you write. In this session we will talk about our experience on how to achieve the highest possible performance without much rewriting of your code, which trade-offs C++ compilers have, how to make the most of your micro-architecture, why unrelated changes may decrease the performance and how to debug them. In the end we will show which compiler options gave us the opportunity to gain 5-15% of performance, stabilized the benchmarks and decreased the build size for search engines, databases and high performance computing.

Cppcon 2021 Back To Basics: Overload Resolution--Barbara Geller and Ansel Sermersheim

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2021 to attend in person, online, or both!

Back To Basics: Overload Resolution

Tuesday, October 26 • 9:00am - 10:00am

by Barbara Geller and Ansel Sermersheim

Summary of the talk:

During this talk we will explain the definition of a function overload and what rules the compiler follows to decipher which overload to call. The rules can be complex and may not always do what you expect. We will condense the C++ standard to the essential rules every programmer should be aware of in order to reason through overload resolution.

Knowing how overload resolution works will improve your ability to debug compiler errors and this is vital to write correct code. We will provide simple and concise explanations for various buzzwords like template argument deduction, implicit conversion, standard conversions, and tie-breakers.

This talk is part of the Back to Basics track and the material will be targeted to include all skill levels. Familiarity with C++ is recommended however no prior knowledge of function overloads is required.

C++ Russia 2021 Conference

C++ Russia, 15 Nov - 18 Nov is a conference with several tracks of in-depth technical talks devoted to C++.

C++ Russia

About the conference

The conference covers topics like

  • concurrency;
  • performance;
  • architecture;
  • infrastructure solutions.

All you need to make your code more concise and productive.

Among speakers:

  • Titus Winters, Google;
  • Phil Nash, SonarSource;
  • Anton Polukhin, Yandex Go;
  • Denis Yaroshevskiy, Bloomberg.

You can view the list of speakers and the first program on the website.