RE: [boost] Re: Standard C Library and C++ / BOOST

David Abrahams wrote:
"Klaus Nowikow" <nowikow@decomsys.com> writes:
You're wrong. *this is copied before it is thrown. Still, the idiom above seems a bit suspicious, unless you somehow prevent derivation from errorcheck.
So is it possible to prevent derivation? If not, then at least make it harder to do so (and put a warning in the docs)? Also, would a non-derivable class be a good addition to C++0x? Regards, Reece _________________________________________________________________ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger

"Reece Dunn" <msclrhd@hotmail.com> wrote
So is it possible to prevent derivation? If not, then at least make it harder to do so (and put a warning in the docs)?
Yes. Legal way: http://www.research.att.com/~bs/bs_faq2.html#no-derivation By exploiting shortcomings of current compilers: http://www.cuj.com/documents/s=8942/cujweb0312wilson/ The feature was also discussed thoroughly on newsgroups. /Pavel

On Sun, 28 Mar 2004 12:55:10 +0200, "Pavel Vozenilek" <pavel_vozenilek@hotmail.com> wrote:
"Reece Dunn" <msclrhd@hotmail.com> wrote
So is it possible to prevent derivation? If not, then at least make it harder to do so (and put a warning in the docs)?
Yes.
Legal way: http://www.research.att.com/~bs/bs_faq2.html#no-derivation
And where is derivation prevented? ;) That only gives an error when you try instantiating the derived class. (Not only you may still derive, but of course you can access and use any static members). Genny.

"Gennaro Prota" <gennaro_prota@yahoo.com> wrote in
So is it possible to prevent derivation?
And where is derivation prevented? ;) That only gives an error when you try instantiating the derived class. (Not only you may still derive, but of course you can access and use any static members).
Well, that's the closest legal way to get functionality of 'final'. AFAIK no such feature is planned even for C++0x. /Pavel
participants (3)
-
Gennaro Prota
-
Pavel Vozenilek
-
Reece Dunn