Slides of my CppCon 2019 Presentation “C++20 What’s In It For You?”
On September 18th, 2019 I gave a presentation titled “C++20 What’s In It For You?” at CppCon 2019.
The slides of my presentation can be downloaded below:

On September 18th, 2019 I gave a presentation titled “C++20 What’s In It For You?” at CppCon 2019.
The slides of my presentation can be downloaded below:

The next meeting of the Belgian C++ Users Group is planned for Thursday October 10th, 2019 at 18:00 at Brabanthal (room Luna).
think-cell ( https://www.think-cell.com/ ) is sponsoring this event by providing the location, drinks and catering.
The agenda is as follows:
We will be giving away 2 copies of Professional C++, the 4th Edition.
We will also give away a copy of C++17 Standard Library Quick Reference.
The event is free for everyone, but you need to register for it.
There are 80 seats available for this event.
Note: The deadline for registrations is October 9th, 2019!
Together with Peter Van Weert, we finished our new book titled “C++17 Standard Library Quick Reference”. It’s published by Apress.

This quick reference is a condensed guide to the essential data structures, algorithms, and functions provided by the C++17 Standard Library. It does not explain the C++ language or syntax, but is accessible to anyone with basic C++ knowledge or programming experience. Even the most experienced C++ programmer will learn a thing or two from it and find it a useful memory-aid.
It is hard to remember all the possibilities, details, and intricacies of the vast and growing Standard Library. This handy reference guide is therefore indispensable to any C++ programmer. It offers a condensed, well-structured summary of all essential aspects of the C++ Standard Library. No page-long, repetitive examples or obscure, rarely used features. Instead, everything you need to know and watch out for in practice is outlined in a compact, to-the-point style, interspersed with practical tips and well-chosen, clarifying examples.
This new edition is updated to include all Standard Library changes in C++17, including the new vocabulary types std::string_view, any, optional, and variant; parallel algorithms; the file system library; specialized mathematical functions; and more.
All C++ programmers, irrespective of their proficiency with the language or the Standard Library. A secondary audience is developers who are new to C++, but not new to programming, and who want to learn more about the C++ Standard Library in a quick, condensed manner.
The second Belgian LLVM Meetup will take place at the Guardsquare offices in Leuven, the 19th of June. Anyone who’s working with, or is simply interested in, the LLVM project or any of its tools; Clang, lldb, lld, Polly,… is invited. The evening starts off with three short talks on various LLVM related topics. Afterwards, there will be plenty of time to exchange experiences and get to know the local LLVM community.
More details at: http://meetu.ps/e/GMrp0/BJHXT/f
The next meeting of the Belgian C++ Users Group is planned for Wednesday July 3rd, 2019 at 18:00 at CluePoints @ OFFBar | ONSpace.
CluePoints ( https://cluepoints.com/ ) is sponsoring this event by providing the location, drinks and catering.
The agenda is as follows:
We will be giving away 2 copies of Professional C++, the 4th Edition.
We will also give away two copies of Beginning C++17, From Novice to Professional.
The event is free for everyone, but you need to register for it.
There are 50 seats available for this event.
Note: The deadline for registrations is June 30th, 2019!
I’m happy to announce that the number 1 university in China, the Tsinghua University, has finished with the translation work for my book “Professional C++ 4th Edition“.
The Chinese version can be found here.

On 2nd of April, Microsoft has released Visual Studio 2019. It comes with a host of IDE and performance improvements. For C++ developers, here are some new features:
This is just a selection of some of the new features. The new release includes other productivity, CMake-related, and backend improvements for C++. The full release notes can be found here.
The recently released Preview 2 of Microsoft Visual Studio 2019 contains quite a few improvements and new features.
Preview 2 includes a Lifetime Profile Checker that implements the Lifetime Profile as published by the C++ Core Guidelines. It includes:
This feature is not enabled by default, but you can enable it in the code analysis ruleset for your project. An example of what this checker can catch is the following in which we have a dangling string_view:
std::string get_string();
void dangling_string_view()
{
std::string_view sv = get_string();
auto c = sv.at(0);
}
You can read more about this feature here.
New features include:
New and improved optimizations include:
Preview 2 also improves build throughput. Link times might be improved up to 2x.
The new linker will now report potentially matched symbol(s) for unresolved symbols, like:
main.obj : error LNK2019: unresolved external symbol _foo referenced in function _main
Hint on symbols that are defined and could potentially match:
"int __cdecl foo(int)" (?foo@@YAHH@Z)
"bool __cdecl foo(double)" (?foo@@YA_NN@Z)
@foo@0
foo@@4
main.exe : fatal error LNK1120: 1 unresolved externals
More details can be found on this blog post.
The following updates for Template IntelliSense are included with Preview 2:
Read all about it on this blog post.
Preview 2 comes with the following new quick fixes and code navigation improvements:
Read more about this new features here.
Preview 2 includes new code analysis checks:
Read more about them here.
Code analysis now runs automatically in the background, and warnings display as green squiggles in-editor. Analysis re-runs every time you open a file in the editor and when you save your changes.
Squiggles are improved. Squiggles are now only displayed underneath the code segment that is relevant to the warning.
Read more here.
A while ago, I gave a presentation about memory management in modern C++. It touched the following topics:
Below you can find the slides of that presentation.

C++17 includes an std::scoped_lock (defined in <mutex>) which basically replaces std::lock_guard. Both are RAII classes that automatically unlock a mutex when they are destroyed. The only difference between the two is that the new scoped_lock can handle multiple mutexes automatically, while lock_guard is limited to a single mutex.
Using the scoped_lock RAII class is straightforward. Here is an example:
std::mutex mutex1;
// ...
std::scoped_lock<std::mutex> sl(mutex1);
The scoped_lock class template is a variadic template supporting any number of mutexes:
std::mutex mutex1;
std::recursive_mutex mutex2;
// ...
std::scoped_lock<std::mutex, std::recursive_mutex> sl(mutex1, mutex2);
The declaration of the scoped_lock can be simplified thanks to C++17 template argument deduction for constructors:
std::mutex mutex1;
std::recursive_mutex mutex2;
// ...
std::scoped_lock sl(mutex1, mutex2);
C++ always had support for template argument deduction when calling function templates. For example, suppose you have the following function template:
template<typename T>
void MyFunction(const T& data) { /* ... */}
It’s a function template with one template parameter. When you call this function, you do not have to specify the type of the template parameter explicitly. C++ automatically deduces the type T based on the arguments passed to the function. For example:
MyFunction(5);
MyFunction("Test");
If you really want to specify the template type explicitly you do this as follows:
MyFunction<int>(5);
MyFunction<std::string>("Test");
Up to C++17, this deduction only worked for function templates. C++17 adds support for template argument deduction for constructors of class templates.
For example, before template argument deduction for constructors, when you instantiate any Standard Library container you have to specify the type of the elements you want to store in the container:
std::vector<int> ints = { 11,22,33 };
With C++17’s template argument deduction for constructors, you can omit the explicit specification of the type. Of course, this only works when you instantiate the container and immediately initialize it with initial elements, otherwise the compiler has no data from which it can deduce any types. So, the above example can be written in C++17 as follows:
std::vector ints = { 11,22,33 };
This seemingly little feature has quite an impact. Because of the lack of this feature in previous versions of C++, the Standard Library included helper function templates. For example, a std::pair<int, std::string> can be constructed in the following two ways (pre-C++17):
std::pair<int, std::string> myPair1{ 11, "Eleven" };
auto myPair2 = std::make_pair(12, "Twelve");
Either you directly use the std::pair class and explicitly specify the template parameters, or, you use the specially-introduced std::make_pair() function template that can do the template argument deduction.
With C++17’s new deduction rules, you can forget about the helper function templates, and simply write the following:
std::pair myPair3{ 13, "Thirteen" };
Similarly for other helper function templates that were introduced earlier like std::make_move_iterator() to make a std::move_iterator(), and so on.
If you want to add support for template argument deduction to your own classes, then you will have to write your own so-called deduction guides, but that’s for a future post.
The next meeting of the Belgian C++ Users Group is planned for Monday February 4th, 2019 at 18:00 at Sioux @ Aldhem Hotel (Room d’Artagnan 3 & 4).
Sioux ( http://www.sioux.eu/ ) is sponsoring this event by providing the location, drinks and catering.
The agenda is as follows:

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

We will also be giving away a copy of C++ Standard Library Quick Reference.

And finally, we will also give away a copy of Beginning C++17, From Novice to Professional.
The event is free for everyone, but you need to register for it.
There are 70 seats available for this event.
Note: The deadline for registrations is January 27th, 2019!
Microsoft has release version 15.9 of Visual Studio 2017. This update includes a few interesting new additions for C++ developers. From their VC++ release notes:
You can find the full release notes here.
On September 27th, 2018 I gave a presentation titled “Writing Standard Library Compliant Data Structures and Algorithms” at CppCon 2018.
You can find the slides here.
The official video is now also available on YouTube. Enjoy 🙂
The C++14 Standard Library already contains a wealth of different kinds of algorithms. C++17 adds the following new algorithms and new options to existing algorithms:
I wrote an article for the Visual C++ Team Blog explaining what’s new and what has changed related to algorithms in the C++17 Standard Library in more details.
On September 27th, 2018 I gave a presentation titled “Writing Standard Library Compliant Data Structures and Algorithms” at CppCon 2018.
The slides of my presentation can be downloaded below:


The Dekimo C/C++ Challenge is a contest designed to inspire creative and enthousiastic C/C++ Students & Professionals located in Belgium.
The first round is played online. The students and the professionals will compete in separate leagues so that everyone gets a fair chance in competing to be crowned as Belgian C/C++ Champion.
Registration is free and open during the entire duration of the Challenge (6 weeks, September 24 till November 2, 2018).
At the end of the online round, the top 20 players will be invited for the finals.
The finals will take place on Thursday, November 15, 2018 starting at 18:30 at the EDITx headquarters in Brussels (more details will follow).
The finals are intended to determine the top player in each league. Of course, there are cool prizes to be won that all have to do with smart electronics (a nifty drone for the winner in each league, and a nice voucher for the runners-up!)
The next meeting of the Belgian C++ Users Group is planned for Thursday October 25th, 2018 at 18:00 at Altran.
Altran ( http://www.altran.com/ ) is sponsoring this event by providing the location, drinks and catering.
The agenda is as follows:

We will be giving away 2 copies of Professional C++, the 4th Edition.
The event is free for everyone, but you need to register for it.
There are 80 seats available for this event.
Note: The deadline for registrations is October 21st, 2018!

C++17 provides developers with a nice selection of new features to write better, more expressive code.
Bartłomiej Filipek has released a book titled “C++17 in Detail” that describes all significant changes in the language and the Standard Library. What’s more, it provides a lot of practical examples so you can quickly apply the knowledge to your code. The book brings you exclusive content about C++17. Additionally, the book provides insight into the current implementation status, compiler support, performance issues and other relevant knowledge to boost your current projects.
The book is a work in progress and is currently 90% finished. The final version should be coming in at around 250 pages. Even though it’s not finished yet, if you buy early, you’ll get free updates later.
Here are the features you’ll learn from reading this book:
You can find more information on the book’s website.
My friend Marius Bancila has posted a nice overview about existing C++ features that have been either removed by C++17 (after being deprecated in a previous version) or that have been deprecated in C++17 so that they could be removed sometime in the future. His list is not exhaustive, but the most important of these removed or deprecated features are mentioned. Removed features include:
Deprecated features include: