On Thu, 2 Oct 2003 19:22:40 +0200 (Romance Daylight Time) Vadim Zeitlin
<[EMAIL PROTECTED]> wrote:

>  No, quoting from http://www.boost.org/libs/smart_ptr/shared_ptr.htm
> 
>       The class template is parameterized on T, the type of the object
>       pointed to. shared_ptr and most of its member functions place no
>       requirements on T; it is allowed to be an incomplete type, or void

There must be call to delete operator somewhere. As shared_ptr is template,
delete call must be generated at point of instantiation. What they probably
mean is that merely declaring member variable of shared_ptr type doesn't
require complete type of template parameter. But local and temporary
variables call destructor and this pulls in delete operator.

> A word of caution: your patch didn't compile here because
> there is also SpamManager::Pointer and VC6 was unhappy about using the same
> name as template class and "normal" class, so you shouldn't use such name
> (well you shouldn't use it anyhow, it's too generic...).

I can use for example RefCounter.

> Also, if you want
> my implementation of SharedPtr which is known to work with VC6 (and gcc but
> this is simple[r]), let me know and I'd mail it to you.

I think I can write VC6-compatible code without too much work. You can of
course patch it with any improvements.

BTW, we will probably have to drop XXX_obj naming, because it requires
typedef-ing template instance and such typedefs cannot be duplicated in
headers. It shouldn't be that big problem to write RefCounter<XXX>
everywhere.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-Developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-developers

Reply via email to