Tag Archives: templates

Implementing a four-bit adder with C++ template metaprogramming

I recently read a post by Phillip Larkson where the C preprocessor was used to implement a four-bit adder entirely at compile time. This got me wondering whether I could implement the same concept using C++ template metaprogramming. It seemed … Continue reading

Posted in C/C++ | Tagged | 1 Comment

A simple introduction to type traits

Type traits are a slightly more advanced topic in C++ because it they are heavily used in template metaprogramming. However, it is not an impenetrable concept, and it comes with some great benefits if you like to write generic, reusable … Continue reading

Posted in C/C++ | Tagged , , | 11 Comments