The problem is that we're using the same names in the C++ binding as
in the C binding, but for *different* objects.
The solution is to use different names in the C++ binding for the new
(C++) objects. (Since we can't change the existing C binding this is
the only solution !) The effect of this is to make the C++ binding
look slightly more different from the C binding than it does in the
current draft.
However this seems a small price to pay, since
1) Having two different things with the same name is extremely
confusing.
2) You need to know which object you are dealing with.
3) We can then provide implicit cast operators to make the C++ objects
convert to the C objects where appropriate, making calls to C
libraries wanting the C handle trivial.
4) We avoid all the mess with macros or namespaces.
Therefore I strongly recommend that we come up with new names for the
C++ objects.
I have no suggestion that I really like yet as to what names to give
these, something like MPIX_... might be OK ?
-- Jim
James Cownie
BBN UK Ltd
Phone : +44 117 9071438
E-Mail: jcownie@bbn.com