The possibility of overloading just about any C++ operator and having it do something entirely different from what it was designed for, can sometimes make life pretty hard. Here are a couple of examples: What if you wanted to take the address of an object, which had implemented an entirely different semantic for the ampersand [...]
Archive for February, 2010
Escaping overloaded operators
Posted in tricks on 19/02/2010 | 6 Comments »
Metalists for fun and profit
Posted in meta on 07/02/2010 | 9 Comments »
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 [...]
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