Empty Base Class Optimisation, no_unique_address and unique_ptr--Bartlomiej Filipek

Save to:
Instapaper Pocket Readability

Life made easier.

Empty Base Class Optimisation, no_unique_address and unique_ptr

by Bartlomiej Filipek

From the article:

C++20 added a couple of new attributes in the form of [[attrib_name]]. One of them - [[no_unique_address]] - can have surprising effects on the code! In this blog post, you’ll learn how to optimize your classes' layout and make some data members “disappear”. In most cases, it will be just one line of C++20 code.

Let’s go...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.