C++ pattern matching http://bit.ly/1qUzWI4