Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches

◆ operator->()

template<typename Prx, typename... Bases>
const Prx * Ice::Proxy< Prx, Bases >::operator-> ( ) const
inlinenoexcept

The arrow operator.

Returns
A pointer to this object.
Remarks
This operator is provided for aesthetics and for compatibility reasons. A proxy is not pointer-like: it does not hold a value and can't be null. Calling greeter->greet("bob") is 100% equivalent to calling greeter.greet("bob") when greeter is a GreeterPrx proxy. An advantage of the arrow syntax is it's the same whether greeter is a GreeterPrx, an optional<GreeterPrx>, or a smart pointer like in earlier versions of Ice. It's also aesthetically pleasing when making invocations: the proxy appears like a pointer to the remote object.

Definition at line 55 of file Proxy.h.