Feeds:
Posts
Comments

Archive for the ‘meta’ Category

My name is Nadav Rotem and I am a guest blogger on this blog. I am here to write about metalists. Not metalists like Metallica or Iron Maiden, but meta-lists. Lists which are “template maiden”. The First thing I am going to show you is how to create a data structure which is similar to a [...]

Read Full Post »

Compile time primality test

The powerful template mechanism of C++ allows us to write pretty complex Meta Functions, which are executed by the compiler during compilation. There are two basic types of meta-functions: one whose result is a type (mainly dealt with by Boost.MPL), and the other is a compile-time computation (which can result in any compile time constant). [...]

Read Full Post »

I’ve finally had a little time to advance with reading Alexandrescu’s book on Modern C++ design, and I’m absolutely blown away by the sheer awesomeness of its ideas. I highly recommend getting this book! I would like to show just a little bit of what we can do with template specialization when it comes down [...]

Read Full Post »

As promised, this article continues and provides a thorough explanation of the previous post.

Read Full Post »

Explanation on what is SFINAE can be found at wikipedia. I’ve tried to write my own explanation but ended up with the conclusion that it’s best described there, and I wouldn’t want to copy&paste stuff. If you have any question marks floating around your heads, please don’t hesitate to ask. SFINAE is used alot in meta-programming. For [...]

Read Full Post »