Tag: C++ 20

Interfaces Without Inheritance: Comparing C++ and Common Lisp

Written by on April 24, 2025 in C++, LISP with 0 Comments
Interfaces Without Inheritance: Comparing C++ and Common Lisp

Clean interface design is a crucial aspect of software engineering since it enables code flexibility, reuse, and maintainability. Developers who prefer an object-oriented approach typically rely on inheritance to define the interface and thus establish type relationships. While this can lead to a good design if approached carefully, detractors of OOP point out that this […]

Continue Reading

C++20 [[no_unique_address]] Attribute

Written by on June 26, 2022 in C++, Programming with 0 Comments
C++20 [[no_unique_address]] Attribute

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. […]

Continue Reading

C++ 20: Concepts

Written by on September 19, 2021 in C++, Programming with 0 Comments
C++ 20: Concepts

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 […]

Continue Reading

Top