Code taken from slides shown in the CppCon2019 talk "Expression Templates for Efficient, Generic Finance Code" by Bowie Owens.
cmake -B build -G Ninja
cmake --build build
include/expressionTemplates.hpp
: Generalexpr
class and concepts for whitelisted arguments for binary operation.include/triangle.hpp
: One sample type making use ofexpr
.tests/standardExample.cpp
: Showing the general problem of temporaries in expressions.tests/tests.cpp
: Applying expression templates for triangle matrix elementwise multiplication. TypeMyReal
is introduced to count multiplications.