Click here to Skip to main content
15,903,012 members
Articles / Programming Languages / C++20

The Mystery of the Missing Bytes

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
22 Apr 2023CPOL6 min read 1.3K  
In this article you will see how to save bytes and alignment when containing some types inside a structure.
Here you will also learn about techniques to avoid wasting space on unique_ptr deleter and on other structures allocators like std vector or map, taking into account Empty Base Optimization (EBO) and no_unique_address attribute sice C++20.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Israel Israel
Senior C++ developer.
C++ Senioreas blog writer.
Passionate about investigating the boundaries and exploring the advanced capabilities of C++.

Comments and Discussions