Being aware of overengineering is crucial when working with a feature-rich language like C++. Overengineering occurs when developers introduce overly complex or unnecessary solutions to a problem.
C++ developers could be attempted to use as possible the new features introduced by the new standards. which makes the code finally more complicated than it must be.
Here’s an example to show how C++ metaprogramming can be used to create a type-erased container with arithmetic operations that are evaluated at compile time. While this example show the power and flexibility of C++ metaprogramming techniques. it might seem complicated due to the use of templates, concepts and constexpr functions:
Continue reading “C++ is now a feature-rich language, Be aware of OverEngineering”