Boost logo

Boost :

From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-08-05 13:51:51


--- Andrei Alexandrescu <andrewalex_at_[hidden]>
wrote:

> This approach is definitely sound, except that you
> need to write quite some
> scaffolding (ctors etc. etc.) for each handle
> wrapped. With a policy you can
> put the scaffolding in one place and then write only
> the stuff that varies.
> In the particular case of handles, maybe there's not
> a ton to wrap there,
> but if you want to be generic as the original poster
> suggested, you do need
> to use parameterized types.
>
> Ah, one more point that was discussed... there was
> much around operator->
> and operator* which don't make sense for certain
> resources. With Loki's
> SmartPtr, you can disable these two functions.
> Granted, the error message
> would be different, such as "get_reference not
> found" as opposed to
> "operator* not found". Would this be a major issue?
>

There is a discussion going on about a GUI/GDI
template library. I think a smart handle library would
be useful there. IMHO the policy/traits based approach
is the way to go, actually not just for the
smart_handle library, but for any boost library that
needs to access platform specific features.
Just my $.02.

Eugene

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk