Re: Copy constructors
On Mon, 09 Jul 2007 11:30:18 +0200, "Mateusz Loskot" <mloskot@gazeta.pl>
wrote:
Even some older compilers [1] support it, including Visual C++ 6.0.
[1] http://www.cantrip.org/emptyopt.html
Yes, I know. Did you know that even the current version of VC++ does not
fully apply the optimization in the face of multiple inheritance? The point
is, you don't have to think about this to use the "direct method", for lack
of a better term.
(You know, I've always liked Nathan's article. I like it so much, I've been
citing it since at least 7/2000. :)
All that said, the boost facility is still cumbersome.
matter of taste.
It's a matter of having to #include a header file to use the technique and
forcing the use of boost for something expressible within the language
using a well-known idiom with roughly equivalent (in)convenience.
Given that I make most of the classes I write
non-copyable, I wish the language would address this directly.
Yes, I wish that too.
There ought to be some sort of general mark-up facility, perhaps similar to
what MS did with attributes. The boost approach achieves essentially that
by hijacking inheritance to exploit accessibility rules.
--
Doug Harrison
Visual C++ MVP