cplusplus.co.il

Archive for September 2009

Substitution failure is not an error, part I

Posted by: rmn on: 11/09/2009

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 [...]

Trigraphs

Posted by: rmn on: 08/09/2009

How would you like the next piece of code?

More on arrays

Posted by: rmn on: 06/09/2009

Let’s have a better look at native arrays.

Many times we are required to define both a copy constructor and an assignment operator (for example: according to the rule of three, if we need one we are likely to need the other). The two will probably share a pretty common code, if not exactly the same. So what we will do in many [...]

Final/frozen classes in c++

Posted by: rmn on: 01/09/2009

A final (or frozen) class is a class that can’t be further extended by inheritance. In many languages we have different keywords for such behaviour, such as “final” in Java, or “sealed” in c#. Unfortunetly we don’t have such construct in c++; but we can use other mechanisms to easily achieve this goal.


Follow

Get every new post delivered to your Inbox.

Join 25 other followers