Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-05-02 19:41:31

"Greg Colvin" <greg_at_[hidden]> wrote in message
> And, referring back to a point you made about HANDLE causing
> shared_ptr<HANDLE> to different things (like files and windows)
> to be assignable, I think the real problem is that Win32 uses
> a void* handle to point to all kinds if things, and has many
> functions that work on generic HANDLEs, as well as many functions
> that work only on specific HANDLEs. It's a mess to untangle,
> but can be done with a wrapper class for the generic HANDLE and
> derived classes for more specific HANDLEs.

Inheritance doesn't model things properly here. The different types of
handles in Windows are unrelated and do not sport much commonality and
little variation. Consequently, a hierarchy is not useful here.

Different types of handles should map to different, distinct types.

> Then we can negotiate shared_ptr's assimilation.

As I wrote in my post "Adding Loki to Boost: reprise", I believe that it's
best I don't put myself in a negotiator's position.


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