Robert Greig escribió:
I will install VS 2008 on my machine and see what it says but my money
right now is that this will work on that platform and is a bug in the
Sun compiler.
I'm not so sure. The counter argument is: dynamic-cast operates on run time
types. The run-time type is AsyncIO. AsyncIO is not (publicly) a
DispatchHandler therefore the cast should fail.
OK, I tried this out with VS 2008. It agrees with gcc, and the cast succeeds.
RG
My thoughts:
1.- We have an AsyncIO object
2.-From the internals of DispatchHandle, we are passing a *this pointer
to a method accepting PollerHandle. This works, but isn't actually that
pointer for an AsyncIO object, the one we have really requested, and
hence, shouldn't it be allowed to upcast it to its private base? Or is
the *this pointer, when used from the DispatchHandle scope, considered
just a DispatchHandle* ?
3.-Later on, we want to downcast again to DispatchHandle from the
PollerHandle, that previously was (kind of) an AsynchIO. This is not
allowed, and it is right, I guess, if what we have is an AsyncIO.
In the SunCC forum, they trust the bug theory, and asked me to open a bug...
http://forum.java.sun.com/thread.jspa?threadID=5301939
So, well, I was happy with the inheritance going public, as I was able
to open a connection to the broker without visible disasters. I'm going
with that inheritance changed to continue working on the port, until I
had some other solution: Fix from SunCC developers or Steve patches
being merged.
About the git issue, I've never used it before, but some checkouts
occasionally. What would be the workflow? To share our changes until we
have something working on both platforms, to be submitted as a whole
patch to the qpid JIRA? Or are we relying in some git patch management
strength to work with both patches applied but being able later to
submit individual patches for each port?
Best regards.