intermediate

Guidelines for constructor and cast design--Jonathan MĂĽller

Interesting indeed!

Guidelines for constructor and cast design

by Jonathan Müller

From the article:

A while back — but sadly not too many blog posts ago — I wrote about explicit constructors and how to handle assignment. In this blog post, I made the assumption that you most likely want to have explicit single argument constructors.

But when do we actually want implicit single argument constructors?

Let’s consider the broader question: How should I design a cast operation for my user-defined type? And how should I design a constructor?

But first, something different: what is the difference between a cast and a constructor?

The Pimpl Pattern - what you should know--Bartlomiej Filipek

A good sum up.

The Pimpl Pattern - what you should know

by Bartlomiej Filipek

From the article:

Have you ever used the pimpl idiom in your code? No matter what’s your answer read on smile

In this article I’d like to gather all the essential information regarding this dependency breaking technique. We’ll discuss the implementation (const issue, back pointer, fast impl), pros and cons, alternatives and also show examples where is it used. You’ll also see how modern C++ can change this pattern. Moreover, I hope you’ll help me and provide your examples...