Pure Virtual C++ 2024 Conference

Pure Virtual C++ is a free one-day virtual conference for the whole C++ community. This year it will run on April 30th 15:00 UTC. Sign-up for free to get access to five sessions on the day and a host of pre-conference content.

Here is the list of sessions:

  • Automated Testing of Shader Code with Keith Stockdale (Rare) – Rare has a rich culture of writing automated tests for their game and engine code. The ‘Sea of Thieves’ project has hundreds of thousands of automated tests that exist to validate behavior and to ensure that bugs are kept to a minimum, as we continually deliver an ever-changing experience to players. Among this large test suite are tests that validate and verify shader code. This session explores the new Rare Shader Test framework, describing how tests are written for shader code. The talk will also delve into the C++ and HLSL implementation of the shader testing framework to discuss the design goals of the system, and how we are using C++ to meet these design goals.
  • Message Handling with Boolean Implication with Ben Deane (Intel) – Message reception and dispatch is something common to many codebases. This talk shows the unreasonable effectiveness of going back to basics and really understanding and unlocking the power of Boolean algebra in the design of a message handling library. We’ll talk about composing predicates on messages and manipulating them at compile time in order to do the least work when dispatching them at runtime. Particularly we’ll introduce implication, develop an intuition for this lesser-used Boolean operation, and see how it is key to a generic approach for simplifying predicates.
  • I Embedded a Programming Language In Debug Information with Sy Brand (Microsoft) – DWARF information on Linux provides debuggers with a bridge between high-level source code and the machine instructions generated by the compiler. As part of this, it describes how to locate variables within your program at runtime using a language called DWARF Expressions. When implementing a parser for DWARF Expressions I thought “this seems suspiciously Turing-complete, can I implement a programming language inside this?” It turns out the answer is yes. In this session you’ll learn how debug information and executables are stored on Linux systems and how I managed to (ab)use them to implement a programming language interpreter that runs when you ask your debugger for the address of a variable.
  • Enhancing C++ development with Copilot Chat with Sinem Akinci (Microsoft) – Copilot is an AI-powered pair programmer integrated into Visual Studio and VS Code that can be there to assist you at many different points in your C++ development journey. In this session, we’ll introduce Copilot and Copilot Chat, share tips for achieving the results you want, and provide different use cases for using these tools. Then, we’ll see these tools in action in C++ code in Visual Studio as we tackle a variety of problems from navigating and understanding code to refactoring existing code.
  • Progress Report: Adopting Header Units in Microsoft Word with Zachary Henkel (Microsoft) – Microsoft Office is a huge C++ codebase with nearly 100 million lines of native code. This size provides a constant challenge to build the product as quickly as possible. C++20 header units are a way to receive many of the benefits of modules, while still working with a codebase originally designed for classic header inclusion. At CppCon 2022 we announced that Office would investigate header units with the goal of improved build throughput. We’re excited to present the results of that work for the benefit of the C++ community at large. In this session, we’ll share build performance metrics for the first time.
Share

Next BeCPP UG Meeting Planned for April 8th, 2024

I’m happy to announce that the next meeting of the Belgian C++ Users Group is planned for Monday April 8th, 2024 at 18:00 at Attentia.

Attentia ( https://www.attentia.be/ ) is sponsoring this event by providing the location, drinks and catering.

Attentia Logo

The agenda is as follows:

  • 18:00: Reception with food.
  • 18:30: Session 1: Building a class for modular arithmetic (Toon Baeyens)
    Writing modern C++ is not easy. Yet, doing it well brings you many benefits. The code will be elegant, and the program will be fast.
    In this talk, we will be building a type for modular arithmetic as an excuse to discover many powerful features and techniques within the C++ ecosystem.
    This adventure will take us from concepts, metaprogramming, and dependent types to integer division, studying generated assembly and micro-benchmarking.
  • 19:30: Break
  • 19:45: Session 2: Using C++ in the cloud using the AWS C++SDK (Hans Klabbers)
    Have you ever wondered what cloud computing and serverless provide you as a software developer that creates software with C++? During this talk you will get insight in Amazon Web Services a.k.a. AWS Cloud. A demo of a serverless solution created with AWS services and software built with C++ will be shown during the talk.
  • 20:45: Introduction to Attentia, followed by a drink.

Professional C++, 6th Edition
We will be giving away a copy of Professional C++, 6th Edition.

Beginning C++23, From Beginner to Pro
We will also give away a copy of Beginning C++23, From Beginner to Pro.

The event is free for everyone, but you need to register for it.

There are 60 seats available for this event.

Note: The deadline for registrations is April 4th, 2024!

Share

“Professional C++, 6th Edition” Released

I’m proud to announce that the new edition of my book “Professional C++, 6th Edition” is finished 🙂
It has been updated to the C++23 standard and uses certain C++23 features throughout all examples.

It is published by Wiley/Wrox, and available on Amazon.

Official Description

Expand your C++ knowledge quickly and efficiently with this advanced resource

In the newly revised sixth edition of Professional C++, veteran software engineer and developer Marc Gregoire delivers yet another volume that raises the bar for advanced programming manuals. Covering almost all features of the new C++ standard codenamed C++23, the book offers case studies with working code that’s been tested on Windows and Linux.

As the leading resource for dedicated and knowledgeable professionals seeking to advance their C++ skills, this book provides resources that help readers:

  • Master new features of the latest standard, C++23
  • Maximize C++ capabilities with effective design solutions
  • Discover little-known elements and learn about pitfalls and what practices to avoid
  • Grasp testing and debugging best practices
  • Learn about tips and tricks for efficiency and performance

C++ is a complex language. Professional C++, 6th Edition, allows dedicated practitioners to remain current and abreast of the latest developments and advances.

Share

Slides of My Presentation at CppCon 2023: C++23 An Overview of Almost All New and Updated Features

This year at CppCon 2023, I gave the following session:

  • “C++23 An Overview of Almost All New and Updated Features”

You can find the slides of the session below.

Share

Next BeCPP UG Meeting Planned for October 31st, 2023

I’m happy to announce that the next meeting of the Belgian C++ Users Group is planned for Tuesday October 31st, 2023 at 18:00 at DAE and Howest (Howest, Campus Kortrijk Weide – The Penta).

DAE ( https://digitalartsandentertainment.be/ ) and Howest ( https://www.howest.be/ ) are sponsoring this event by providing the location, drinks and catering.

DAE Logo Howest Logo

The agenda is as follows:

  • 18:00: Reception with food.
  • 18:30: Session 1: Elevating Precision in C++: A Journey below the Surface of Floating-Point (Tom Tesch)
    Floating-point numbers, with their varying levels of precision, serve as foundational components in the toolkit of both new and seasoned C++ developers. In this presentation, we will uncover the inner workings of floating-point variables, explore their limitations, and discuss strategies for extending precision while being mindful of associated trade-offs. Join us as we embark on a journey into the realm of floating-point arithmetic in C++, offering insights that will enhance your programming finesse.
  • 19:30: Break
  • 19:45: Session 2: Coroutines: Don’t try this at home (Lieven de Cock)
    In C++20 we got the core language feature “coroutines”. Mostly oriented to the advanced c++ programmers, and not for the mere mortals, since it requires a lot of boilerplate one would not like to write. It provides the fundamentals to further build upon. Unfortunately the STL library did not build on it yet, more was to come in C++23.
    In C++23 we will only get one follow up: std::generator.
    So let’s revisit coroutines. What are they? A function that can be suspended and resumed. Easily said, but how to make use of it and write that boilerplate after all. We will look at the coroutine from 2 different angles: the user code and the compiler, and we will inspect what each wants or would like to have, and where we need to glue them together and what is needed for that purpose. We will give insights on topics like: coroutine frame, couroutine handle, promise_type, the interface or api.
    And if time permits we will look at an example of coroutines in use in asynchronous code (because a misconception is that coroutines (purely) have to do with threads and async’s).
  • 20:45: Introduction to DAE and Howest, followed by a drink.

The event is free for everyone, but you need to register for it.

There are 250 seats available for this event.

Note: The deadline for registrations is October 29th, 2023!

Share

Next BeCPP UG Meeting Planned for May 11th, 2023

I’m happy to announce that the next meeting of the Belgian C++ Users Group is planned for Thursday May 11th, 2023 at 18:00 at Twikit.

Twikit ( https://www.twikit.com/ ) is sponsoring this event by providing the location, drinks and catering.

Twikit Logo

The agenda is as follows:

  • 18:00: Reception with food.
  • 18:30: Session 1: C++23 – What’s in it for You? (Marc Gregoire)
    C++23, the next release of the C++ standard, introduces new features to the core language and to the Standard Library. This session will bring you up to date with the latest features coming with this new release.
    The session includes core language topics such as consteval if statements, multidimensional subscript operators, decay copy, unreachable code, and more. New Standard Library features that will be shown include monadic operations for std::optional, std::flat_map, std::flat_set, a stacktrace library, changes to the ranges library, improvements to std::format, std::expected, and many more.
  • 19:30: Break
  • 19:45: Session 2: Emscripten, what and how? (Dave De Breuck)
    This talk will give a brief introduction of Emscripten itself and explain how Emscripten, an LLVM-based compiler, converts C++ to JavaScript, which lets you run a C++ codebase on the web at near-native speed.
  • 20:45: Introduction to Twikit, followed by a drink.

The event is free for everyone, but you need to register for it.

There are 60 seats available for this event.

Note: The deadline for registrations is May 9th, 2023!

Share

C++23: Multidimensional Subscript Operator

When you have a class representing multidimensional data, providing access to a specific element in this multidimensional space is often done by providing an operator() with as many parameters as there are dimensions. You had to resort to operator(), because operator[] only supported a single index.

That’s now history, as C++23 introduces the multidimensional subscript operator. Providing such an operator for your class is straightforward:

import std;

template <typename T>
class Matrix
{
public:
	Matrix(std::size_t rows, std::size_t cols)
		: m_rows{ rows }, m_cols{ cols }
	{
		m_data.resize(rows * cols);
	}

	T& operator[](std::size_t x, std::size_t y) { return m_data[x + y * m_cols]; }

private:
	std::size_t m_rows;
	std::size_t m_cols;
	std::vector<T> m_data;
};

The class can be tested as follows:

const std::size_t Rows{4};
const std::size_t Cols{4};
Matrix<int> m{ Rows, Cols };
std::size_t counter{ 0 };
for (std::size_t y{ 0 }; y < Rows; ++y)
{
	for (std::size_t x{ 0 }; x < Cols; ++x)
	{
		m[x, y] = ++counter;
	}
}

for (std::size_t y{ 0 }; y < Rows; ++y)
{
	for (std::size_t x{ 0 }; x < Cols; ++x)
	{
		std::print("{} ", m[x, y]);
	}
	std::println("");
}
Share

C++23: “Hello World!” with Modern C++23

Whenever you learn a new programming language, the first program you write is often a “Hello World!” program that simply prints out “Hello World!” to the console. Up to now, for C++, this usually was something along the following lines:

#include <iostream>

int main()
{
    std::cout << "Hello World!" << std::endl;
}

This code snippets imports the required header, <iostream>, and uses std::cout to output text to the standard console.

With modern C++23, this simple program looks quite a bit different:

import std;

int main()
{
    std::println("Hello World!");
}

What has changed?

  • Instead of including the exact headers that are required, you simply import a single named module, std, provided by the standard.
  • Instead of using std::cout, stream insertion operators, and std::endl, you simply use std::println().

Unfortunately, at the time of this writing, there are no compilers yet supporting all the above new features, but soon there will be.

For the time being, if your compiler doesn’t support the named module std yet, you can simulate it yourself by writing your own named module called std. You can do this by writing a code file called std.cppm with the following contents:

export module std;

export import <iostream>;

You can extent this std.cppm named module with whatever header you need in your program.

Secondly, if your compiler does not support std::println() yet, you can simulate it with your own print module in a print.cppm file, e.g.:

export module print;

import <string_view>;
import <iostream>;
import <format>;

namespace std
{
    export template <typename... Args>
    void println(std::string_view sv, Args&&... args)
    {
        std::cout << std::vformat(sv, std::make_format_args(args...)) << std::endl;
    }
}

Warning: this is a very basic simulation of std::println(), which does not support all the features of the real std::println()!.

Share

Next BeCPP UG Meeting Planned for January 17th, 2023

I’m happy to announce that the next meeting of the Belgian C++ Users Group is planned for Tuesday January 17th, 2023 at 18:00 at Medicim / Envista.

Medicim / Envista ( https://www2.medicim.com/ ) is sponsoring this event by providing the location, drinks and catering.

The agenda is as follows:

  • 18:00: Reception with food.
  • 18:30: Session 1: Constraints and Concepts (Peter Van Weert)
    This presentation consists of two parts:
    First, I explain how you can, and more importantly should, constrain your template arguments using requires clauses and, typically, concepts. Doing so results in more readable compilation errors, self-documenting template definitions, and easier, more expressive template specialization.
    Next, I show how you can define your own concepts using the new syntax introduced in C++20. Quite some new syntax to learn, for sure, but you’ll quickly see that constraints and concepts are far easier to master (or at least understand) than the more advanced SFINAE techniques (std::enable_if_t, std::void_t, …) they essentially supersede.
  • 19:30: Break
  • 19:45: Session 2: Space Invaders: The Spaceship Operator is upon us (Lieven de Cock)
    Before C++20 we had to write 6 comparison operators for our user defined types (or even more). For sure, a tedious task. All this gets simplified with the introduction of the spaceship operator.
    What happens to your code, when you turn on “-std=c++20” even before we go near the spaceship operator, did your build break? Why does that happen? We will first investigate, another new feature of C++20, the rewriting rules, and how that impacts your code base. And then we will dissect the spaceship operator, from a using perspective, and from an implementation perspective. Oh yes, comparison categories, what are those, and why are these important with respect to the spaceship operator? All will be answered, what initially looked so simple, does require some extra thoughts it seems to correctly use the tool.
  • 20:45: Introduction to Medicim / Envista, followed by a drink.
Professional C++, 5th Edition


We will be giving away a copy of Professional C++, 5th Edition.

The event is free for everyone, but you need to register for it.

There are 75 seats available for this event.

Note: The deadline for registrations is January 13th, 2023!

Share

Slides of My Presentation at CppCon 2022

This year at CppCon 2022, I gave the following session:

  • “C++23 What’s In It For You?”

You can find the slides of the session below.

Share

Next BeCPP UG Meeting Planned For June 28th, 2022

After a long break due to the Corona pandemic, I’m happy to announce that the next meeting of the Belgian C++ Users Group is planned for Tuesday June 28th, 2022 at 18:00 at Vandewiele Experience Center.

Vandewiele ( https://www.vandewiele.com/ ) is sponsoring this event by providing the location, drinks and catering.

Vandewiele Logo

The agenda is as follows:

  • 18:00: Reception with food.
  • 18:30: Session 1: Minimal Logging Framework in C++ 20 (Koen Poppe)
    As developers, adding log statements seems easy and risk-free. However, with hundreds of machines, collecting those log files can become quite a challenge, let alone making sense of the important information they contain. We set out to reduce logging to its essentials and explore optimisations not only in terms of disk space, but also runtime performance and even exposure. Leveraging ideas from well-known software related workflows, we will write a C++20 logging framework from scratch and highlight some surprises along the way.
  • 19:30: Break
  • 19:45: Session 2: Modern CMake (Lieven de Cock)
    CMake is a cross-platform open source software for managing the build process in a portable fashion. We will have a look at the basics of modern CMake. The old, pre modern cmake way should be considered obsolete, for very good reasons. We will talk about targets, build types, dependencies, usage specifications, …, a quick look on cross compilation, and using 3rd party libraries.
  • 20:45: Introduction to Vandewiele, followed by a drink.

Professional C++, 5th Edition
We will be giving away 2 copies of Professional C++, 5th Edition.

The event is free for everyone, but you need to register for it.

There are 30 seats available for this event.

Note: The deadline for registrations is June 22th, 2022!

Share

Slides of My Presentation at CppEurope 2022 – A Look Ahead At C++23

On 24th of May 2022 I gave the following session at CppEurope 2022:

  • “A Look Ahead At C++23”

You can find the slides of the session below.

Here’s the official announcement slide:

Share

Microsoft Visual C++ STL is C++20 Feature Complete

Microsoft just announced that their STL included with Visual C++ is now C++20 feature complete. This is the case for:

  • Visual Studio 2022 version 17.2
  • Visual Studio 2019 version 16.11.14

All C++20 features are now available under the /std:c++20 compiler flag.

You can read the full announcement here.

Share

C++20: enum class and using Declarations

C++11 has given use strongly-typed enumeration types which are recommended to be used over the old style enumeration types. The problem with the latter is that the enumerators of such old-style enumeration types are automatically exported into the enclosing scope. This can cause naming collisions with names already defined in the enclosing scope. This is also the reason why enumerators of such types are often prefixed with some label to try to make sure they are unique. For example:

enum Color { ColorRed, ColorGreen, ColorBlue };

The strongly-typed enumeration types from C++11 do not automatically export their enumerators to the enclosing scope.

Let’s look at an example. The following defines and uses a strongly-type enumeration type called Color:

enum class Color { Red, Green, Blue };
Color someColor = Color::Green;

To use the enumerators of the Color enumeration type, you need to fully qualify them with Color::. This can become a bit cumbersome if you, for example, need to have a switch statement on the different enumerators:

switch (someColor) {
    case Color::Red:
        // ...
        break;
    case Color::Green:
        // ...
        break;
    case Color::Blue:
        // ...
        break;
}

Since C++20, you can use a using declaration to avoid having to fully qualify all the different enumerators in the switch cases:

switch (someColor) {
    using enum Color;

    case Red:
        // ...
        break;
    case Green:
        // ...
        break;
    case Blue:
        // ...
        break;
}

Of course, it is recommended to have the scope of the using declaration as small as possible, otherwise you again introduce the risk of having naming collisions. That’s why the using declaration in the earlier example is inside the scope of the switch statement.

My book, Professional C++, 5th Edition, explains all new C++20 features, and much more.

Share

Recording of my CppCon 2021 Session “A Crash Course in Calendars, Dates, Time, and Time Zones”

On October 27th, 2021 I gave a presentation titled “A Crash Course in Calendars, Dates, Time, and Time Zones” at CppCon 2021.
You can find the slides here.

The official video is now also available on YouTube. Enjoy 🙂

Share

C++20: Templated Lambda Expressions

Templated lambda expressions allow you to get easy access to type information of generic lambda expression parameters. This also allows you to put constraints on the types of generic lambda expressions parameters. For example, the following generic lambda expression accepts two parameters, both defined with auto type deduction:

[](const auto& a, const auto& b) { /* ... */ }

Since both parameters are auto type deduced, the compiler is free to choose different types for both parameters. If you do not want this, you can use the following templated lambda expression:

[]<typename T>(const T& a, const T& b) { /* ... */ }

This can be combined with C++20 concepts to further constrain type T. For example, you can require that type T is an integral type as follows (needs <concepts>):

[]<std::integral T>(const T& a, const T& b) { /* ... */ }

Using a templated lambda expression, you have direct access to the type of a parameter. Hence, it’s easier to, for example, create a local variable in your lambda expression that has the same type as the type of one of the parameters. Without a templated lambda expression, you would have to involve decltype() and std::decay_t on generic lambda expression parameters to achieve the same thing.

For example, suppose you have a lambda expression accepting a std::vector where the type of the elements can be anything. We can use a generic lambda expression for this. However, if in the body of the lambda, you want to know the exact type of the elements in the vector, you need to use decltype() and decay_t:

[](const auto& v) {
	using V = std::decay_t<decltype(v)>; // vector's type
	using T = typename V::value_type;    // vector element's type
	T temp;
	/* ... */
}

With a templated lambda expression you can make this much more concise and easier to understand:

[]<typename T>(const std::vector<T>& v) {
	T temp;
	/* ... */
}

My book, Professional C++, 5th Edition, explains all new C++20 features, and much more.

Share

C++20: std::span – A View on a Continuous Sequence of Data

std::span, defined in <span>, allows you to handle a sequence of continuous data, without having to worry about where the data is actually stored. For example, suppose you have a function to print the elements of a std::vector:

void print(const std::vector<int>& values)
{
    for (const auto& value : values) { std::cout << value << " "; }
    std::cout << std::endl;
}

This function requires as argument a reference to a std::vector<int>. If you also want to print elements of a C-style array, then you can add a second overload of the print() function, for example:

void print(const int values[], size_t count)
{
    for (size_t i{ 0 }; i < count; ++i) { std::cout << values[i] << " "; }
    std::cout << std::endl;
}

With these two overloads, you can call your print() function with either a reference to a std::vector<int> or with a C-style array. If you want to support other containers, then you can add even more overloads. With std::span, it is possible to write a single function that can work with all kinds of sequential data. Instead of the previous two overloads, you can just write the following single function:

void print(std::span<const int> values)
{
    for (const auto& value : values) { std::cout << value << " "; }
    std::cout << std::endl;
}

Note that a span basically just contains a pointer to the first element in the sequence and the number of elements in the sequence, and never copies the underlying data. Hence, a span is very cheap to copy and is usually passed by value, just as std::string_view.

This single print() function accepting a std::span can be called for continuous data stored in std::vectors, std::arrays, C-style arrays, and more. Here are some examples:

std::vector v{ 1, 2, 3 };
print(v);                   // Pass a vector.

std::array a{ 4, 5, 6, 7 };
print(a);                   // Pass a std::array.
print({ a.data() + 1, 2 }); // Pass part of a std::array.

int ca[]{ 8, 9, 10 };
print(ca);                  // Pass a C-style array.

std::span s{ v };           // Construct a span from a vector.
print(s);                   // Pass a std::span.
print(s.subspan(1, 2));     // Pass part of a std::span.

The output of this code snippet is as follows:

1 2 3
4 5 6 7
5 6
8 9 10
1 2 3
2 3

Tip: If you write a function accepting a const vector<T>&, I recommend considering to accept a span<const T> instead. This allows your function to work with all kinds of continuous data, independent of where the data is actually stored.


My book, Professional C++, 5th Edition, explains all new C++20 features, and much more.

Share

C++20: Seemingly Unexpected Behavior with Date Arithmetic

C++20 has added support for calendars, dates, and time zones to the C++ Standard Library. This also allows you to perform arithmetic with dates. However, certain arithmetic might give seemingly the wrong results.
Let’s look at a simple example that works as expected:

using namespace std::chrono;
auto timestamp1 = sys_days{ 2022y / January / 19d } + 8h + 39min + 42s;
auto timestamp2 = timestamp1 + days{ 3 }; // Add 3 days
std::cout << timestamp1 << '\n' << timestamp2;

The output is as expected:

2022-01-19 08:39:42
2022-01-22 08:39:42

Now let’s try to add 1 year to timestamp1:

auto timestamp3 = timestamp1 + years{ 1 }; // Add 1 year
std::cout << timestamp1 << '\n' << timestamp3;

The output now is:

2022-01-19 08:39:42
2023-01-19 14:28:54

The date part is correctly incremented with 1 year, but the timestamp looks wrong on first sight. However, this is correct according to the C++ standard. The reason why it is seemingly off has to do with support for leap years. The C++ standard states that adding 1 year to a date must add 1 average year to keep leap years into account. So, while you could expect adding 1 year adds 86,400 * 365 = 31,536,000 seconds (86,400 = number of seconds in a day), it doesn’t. Instead, it adds 86,400 * ((365 * 400) + 97) / 400) = 31,556,952 seconds.

The reason why it is behaving like this is that the type of timestamp1, 2, and 3 is std::chrono::time_point which is a so-called serial type, i.e., it represents a date as a single number relative to a certain epoch (= clock origin). If you don’t want this behavior you can perform the arithmetic with a field-based type. The serial-based types above can be converted to a field-based representation as follows:

// Split timestamp1 into "days" and "remaining seconds".
sys_days timestamp1_days = time_point_cast<days>(timestamp1);
seconds timestamp1_seconds = timestamp1 - timestamp1_days;

// Convert the timestamp1_days serial type to a field-based year_month_day.
year_month_day ymd2 = timestamp1_days;

// Add 1 year.
year_month_day ymd3 = ymd2 + years{ 1 };

// Convert the result back to a serial type.
auto timestamp4 = sys_days{ ymd3 } + timestamp1_seconds;
std::cout << timestamp1 << '\n' << timestamp4;

The output now is:

2022-01-19 08:39:42
2023-01-19 08:39:42
Share

Slides of My Presentation at CppCon 2021

This year at CppCon 2021, I gave the following session:

  • “A Crash Course in Calendars, Dates, Time, and Time Zones”

You can find the slides of the session below.

Share

Next BeCPP UG Meeting Planned For June 24th, 2021

The next meeting of the Belgian C++ Users Group is planned for Thursday June 24th, 2021 at 18:00 and will be held online through Microsoft Teams.

The agenda is as follows:

  • 18:00: The Teams meeting will start to give people plenty of time to join.
  • 18:30: Session 1: A new way of formatting in C++20, are we getting there in the end? (Lieven de Cock)
    We will have a look at the problems the (s)printf family has brought upon us for decades, how iostreams tries to solve this in an unfriendly way, and how we can now have the best of both worlds, with the upcoming C++20 std::format (or for now with the reference implementation fmt::format).
  • 19:30: Session 2: Understanding value categories in C++ (Kris van Rens)
    In C++ today, do you know what an xvalue is? Or a prvalue? Why would you want to know? Because it matters! In C++, each expression is characterized by a value category. These value categories are used to describe parts of the C++ standard, and are often used in books and articles. You might have heard of terms like ‘lvalue’ or ‘rvalue’, which are the most commonly known ones. Over the years, changes to the C++ language changed the meaning of value categories. This means a lot of information about value categories is outdated or just plain wrong. In this talk, I will explain what expression value categories are in today’s C++ standard. It turns out that knowledge about value categories can really be beneficial. Not only will it enrich your understanding of C++ in general, it will deepen your understanding of mechanisms like move semantics. Also, it can help you to make better choices about code. These choices can then leverage language rules to enable compilers to generate efficient code without redundant copies. Other, related topics that will be covered: copy elision, return value optimization, temporary materialization.

The event is free for everyone, but you need to register for it.

There are 300 seats available for this event.

Note: The deadline for registrations is June 23rd, 2021!

Share