Checking sizeof or the offset of a member

October 29th, 2009 § 8 Comments

Suppose we wanted to check the sizeof or the offset of a certain member within our struct (or class), without actually having an instantiated object to run the needed operations on. How would you do that?

« Read the rest of this entry »

Recent blog updates

October 28th, 2009 § Leave a Comment

I have spent quite a few hours during the last two days making thorough changes to this blog.

One of those new updates is the change of the previous blog name, ”c++ talk” (at http://cpptalk.wordpress.com), to the new name “cplusplus.co.il” -  followed by the addition of a new domain name: http://cplusplus.co.il.
However, it is important to note that the blog will remain fully reachable through the old wordpress domain and its links.

« Read the rest of this entry »

Computing the level of indirection for pointer types

October 25th, 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 to meta programming.

« Read the rest of this entry »

Template template parameters

October 19th, 2009 § Leave a Comment

This is actually not a typo, I really meant to repeat the first word. Let’s see what template template parameters are..

« Read the rest of this entry »

Why do cin and cout have conversion to a void* and not bool?

October 11th, 2009 § 7 Comments

Both std::cin and std::cout provide a conversion to a void* type, but not to a boolean:

operator void* (); // zero if and only if fail()

What use does a conversion to a boolean have, and which pitfalls does the current implementation save us from?

« Read the rest of this entry »

Where Am I?

You are currently viewing the archives for October, 2009 at 0x.