Tag: C++ 20
![C++20 [[no_unique_address]] Attribute C++20 [[no_unique_address]] Attribute](http://i0.wp.com/www.rangakrish.com/wp-content/uploads/2022/06/code1.jpg?resize=675%2C240&ssl=1)
The [[no_unique_address]] attribute was introduced in C++20 to give a compiler the freedom to optimise memory allocation of a struct/class when it contains a subobject that does not have any members. The other requirement is that the subobject should not be a static member of the enclosing struct/class. Let us start with the basics first. […]

Concepts, introduced in C++20, are predicates that act as contraints on template parameters. As you would expect, the nice thing is that the constraint checking happens as part of template instantiation at compile time and not at run time! Since templates can have type as well as non-type parameters, Concepts can be applied to both […]
Recent Comments