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 [...]
Archive for the ‘meta’ Category
Metalists for fun and profit
Posted in meta on 07/02/2010 | 9 Comments »
Compile time primality test
Posted in meta on 27/01/2010 | 1 Comment »
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). [...]
Computing the level of indirection for pointer types
Posted in meta on 25/10/2009 | 5 Comments »
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 [...]
Substitution failure is not an error, part II
Posted in meta on 12/09/2009 | 2 Comments »
As promised, this article continues and provides a thorough explanation of the previous post.
Substitution failure is not an error, part I
Posted in meta on 11/09/2009 | 6 Comments »
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 [...]
Search
-
Recent posts
- Variadic macro to count number of arguments
- Futures: asynchronous invocation
- Odd man out
- Quines
- Catching uncaught exceptions within terminate
- Escaping overloaded operators
- Metalists for fun and profit
- Compile time primality test
- A question of memory layout
- Tuples
- Memoization
- Tag dispatching
- The omnipotent arrow operator
- Interesting boost::shared_ptr constructor
- Project Euler
-
Recent comments
Categories
- cpp (54)
- algorithms (3)
- boost (2)
- concurrency (1)
- design (4)
- erroneous (3)
- mechanisms (12)
- meta (5)
- questions (5)
- snippets (5)
- stl (3)
- tr1 (1)
- techniques (5)
- tricks (6)
- general (1)
- puzzles (1)
- cpp (54)
Archives
Options
Blogs
Professional
Technology