Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2004-01-05 01:27:27

Thorsten Ottosen wrote:
> Of course. I'm merely trying to get them to share the secrets. There is not
> much discussion about this
> in the smart pointer docs and neither in the official proposal

No secrets. The issue we're discussing is not new at all. This whole
discussion occurred 4 years ago at an Eiffel forum almost word for word...

What I argued for, then, was introducing deep variants of language
keywords, and I apologize for bringing up a 'language' issue here, but I
would not mind to see C++ introducing...

deep const
deep mutable
deep =
deep ==
deep <classname>(<classname> const &)

But I don't want to see "deep" become the default.

It would complicate compilers to no end.
It would complicate inheritance to no end.
It would complicate exception specifications to no end.

And it's not that I don't see your point:

I'll give you an extra argument for your point of view, in fact:

Shallow copying of a class or struct that has a mixture of values,
pointers and references, seldom makes sense: By-value copying is in a
completely different conceptual universe from aliasing a reference, and
the two hardly ever need mixing (proxies might be an exception). And
this forces us to overload assignments in our sleep.

Still, I find the alternative mind-bogglingly complicating life.

Just my $ .02

Boost list run by bdawes at, gregod at, cpdaniel at, john at