ObjectPtr<Derived> dp = ...;
ObjectPtr<Base> bp(dp); // ok, constructor
bp = dp; // ok, assignment operator
dp = bp; // error
foo(dp); // ok, exact match
foo(bp); // ok, conversion constructor
Furthermore, local pointers are compatible to global pointers to a compatible type. The local pointer is then automatically expanded to a global pointer filling in the local node address. This makes it possible to export references to local objects into the global object space in accordance to C++ type rules. Any local object can therefore potentially be exported to the global space and from any space any other object is also potentially accessible.
Originally C++ inherited pointer arithmetic from C and for all practical purposes we considered it worthwhile to retain this concept for TACO, too. A ArrayPtr class adds pointer arithmetic and subscript operators to object pointers, such that indexed remote array access is possible. Thus, the ArrayPtr class resembles C/C++ style pointers in a distributed environment and can be applied for remote method invocation as well. Both the ObjectPtr class as well as the ArrayPtr class originated from the GlobalPtr class provided by the Multiple Threads Template Library (MTTL), that already exploited most of the basic concepts but did not support polymorphism very well.