Articles & Books

Trip report: C++ Siberia 2020--Timur Doumler

Did you attend?

Trip report: C++ Siberia 2020

by Timur Doumler

From the article:

In 2019, I had a very busy conference year. I had just become self-employed, which meant I did not have to ask anyone’s permission anymore to go to a C++ conference. And because conferences are fun, I decided to go to all of them. Well, not all of them, but I ended up speaking at quite a few that year: CppOnSea (Folkestone), ACCU (Bristol), using std::cpp (Madrid), 4Developers (Warsaw), C++Now (Aspen), CoreC++ (Tel Aviv), C++Russia (both of them – Moscow & St. Petersburg), CppCon (Denver), ACCU Autumn (Belfast), MeetingC++ (Berlin), and finally CoreHard (Minsk). The latter one was particularly memorable because it was the first time a C++ conference invited me to deliver the opening keynote (and it was an amazing experience – thank you!)...

Qt, range-based for loops and structured bindings--Ivan Čukić

Do you have that problem?

Qt, range-based for loops and structured bindings

by Ivan Čukić

From the article:

Qt has a long history. The first stable version was released before the first version of C++ was standardized and long before the different C++ compiler vendors started shipping usable implementations of the C++ standard library. Because of this, Qt often followed (and still follows) some design idioms that feel unnatural to the usual C++ developer.

This can have some downsides for the Qt ecosystem. The evolution of the C++ programming language which sped up quite a bit in the last decade often brings improvements which don’t fit well with the Qt philosophy. In this blog, I offer some ways to work with this...

I Accidentaly Wrote A Compile-Time Executable State Machine--Philippe M. Groarke

Compile time magic.

I Accidentaly Wrote A Compile-Time Executable State Machine

by Philippe M. Groarke

From the article:

Yes, you read that title right. While working on a new way to create finite state machines (fsm), I inadvertently designed a state machine you can execute at compile-time. With branching and everything. Today, allow me to pull you down my rabbit hole. It’s always nicer with company down here.

Let’s go, Alice!

Announcing Meeting C++ 2020!

Today I have the honor to give the kick-off for the official planning and participation in Meeting C++2020:

Announcing Meeting C++ 2020

by Jens Weller

From the article:

Meeting C++ returns with its 2020 conference edition! Like in the previous years, we'll be meeting in Berlin from the 12. - 14th November!

With the current situation of COVID-19, planning events for this year is difficult, though I have decided to go ahead and start the preparations for Meeting C++ 2020! I will keep you posted through out 2020 on the changes for this years conference!

Runtime Polymorphism with std::variant and std::visit -- Bartlomiej Filipek

Read about an interesting way of runtime polymorphism with std::variant/std::visit!

Runtime Polymorphism with std::variant and std::visit

<img alt="" data-cke-saved-src="https://4.bp.blogspot.com/-xp784ADNQ_s/XorA74Xk8rI/AAAAAAAAESM/GFYHPA2a7_4iro82vp1IPBtFdwpLfYAZACLcBGAsYHQ/s1600/varpoly.png" src="https://4.bp.blogspot.com/-xp784ADNQ_s/XorA74Xk8rI/AAAAAAAAESM/GFYHPA2a7_4iro82vp1IPBtFdwpLfYAZACLcBGAsYHQ/s1600/varpoly.png" 200px;="" float:="" right;="" height:="" 64px;"="" style="height: 74px; width: 230px; float: right;">

by Bartlomiej Filipek

From the article:

Runtime polymorphism usually connects with v-tables and virtual functions. However, in this blog post, I’ll show you a modern C++ technique that leverages std::variant and std::visit. This C++17 technique might not only offer better performance and value semantics, but also interesting design patterns.

Making hybrid systems -- Krzysztof Ostrowski

Connecting multiple systems by means of a common denominator.

Making hybrid systems

by Krzysztof Ostrowski

From the article:

In every well-managed software project sooner or later we face cross-system boundaries testing needs, where we basically observe how our software cooperates with the other actors. Those actors include users as well as the other software products. Following article presents an idea of a hybrid system of asynchronous actors running in a heterogeneous environment.

Overload 156 is now available

ACCU’s Overload journal of April 2020 is out. It contains the following C++ related articles.

Overload 156 is now available

From the journal:

R.E.S.P.E.C.T..
Respect can mean many different things. Frances Buontempo muses on its myriad meanings.

Pass the Parcel.
Python’s module and package system has many features. Steve Love explores some more advanced ones.

Quick Modular Calculations (Part 3).
This article concludes the 3-part series. Cassio Neri presents a new algorithm that also works for 64-bit operands.

Deconstructing Inheritance.
Inheritance can be overused. Lucian Radu Teodorescu considers how it can go wrong and the alternatives.

Using Compile Time Maps for Sorting.
Compile time sorting can be interesting. Norman Wilson shows how to sort a map.

Profiting from the Folly of Others.
Code referred to as a hack can raise an eyebrow. Alastair Harrison learns about accessing private members of C++ classes by investigating a header called UninitializedMemoryHacks.h

It’s About Time.
How easy is it to make code wait for a time period before doing something? Mike Crowe looks at ways to avoid problems when a system clock changes.

A Day in the Life of a Full-Stack Developer.
Many roles claim to be full stack. Teedy Deigh shares a day in the life of a full stack developer.

shared_ptr - basics and internals with examples--Hitesh Kumar

Did you know it?

shared_ptr - basics and internals with examples

by Hitesh Kumar

From the article:

The C++11 std::shared_ptr<T> is a shared ownership smart pointer type. Several shared_ptr instances can share the management of an object's lifetime through a common control block. The managed object is deleted when the last owning shared_ptr is destroyed (or is made to point to another object). Memory management by shared_ptr is deterministic because the timing of a managed object's destruction is predictable and in the developer's control. Hence, std::shared_ptr brings deterministic automatic memory management to C++, without the overhead of garbage collection. Here is a basic example of shared_ptr...