C++ Links #4
Welcome to new C++ Links - most important and useful articles, podcasts and videos that happen between 22th and 28th of September.
This week CppCon took place - the biggest C++ conference. In today’s list, you will find the first video from there, about future of C++, you can also see a post about removing duplicate elements from associative containers and an example of really defensive programming.
Post from Christopher Di Bella - he starts with an algorithm that checks if a number is prime (he uses 6k±1 optimisation), and he refactors it using functionally-composed solution. This post can change the mindset of writing clean, readable code using ranges!
If you wonder how really defensive programming looks like, you must read below the article! Philippe Groarke presents an interesting way of doing it, with lots of static_asserts:
A new episode of C++ Weekly from Jason Turner - he rethinks visitor pattern presented in one of the old episode with inheriting from lambda. It looks like with C++17 we don’t have to write so much code - proposed solution looks definitely better:
Post from Jonathan Boccara - he describes how to remove duplicated elements from associative containers:
Rainer Grimm wrote an introduction post before writing about concepts. He shows why do we need generic functions, and when generic is “too generic”:
We were all waiting for this - first video from CppCon conference, an absolute must-see! Our father, Bjarne Stroustrup, is showing how C++ Concepts will change writing generic code:
Post from Arthur O’Dwyer: he presents “perfect backwarding”:
Post from Arne Mertz about the difference between creating
shared_ptrvia a regular constructor and
std::make_shared. It looks like make_shared also has disadvantages:
Jonathan Boccara wrote an article about using auto for declaring variables. He present pros/cons about this style, definitely worth reading:
Abseil has shipped optimized hash containers and a new hashing framework.
You can also track the CppCon Youtube Channel where more and more videos
start to appear!
What’s your favourite link for this week?
Maybe we missed something relevant?
Let us know in comments.
The links are brought to you by Wojciech Razik.
Wojtek is a Senior C++ developer at Thaumatec, currently writing software for a robot. He enjoys reading C++ Standard before bed, and he loves to hate JS from dawn to dusk.
If you know Polish, take a look at cpp-polska.pl where Wojtek is one of the co-authors.