The fact that this is a specific return type does not matter. You can forward the return type declaration.
However, in this case it is not a class, but a typedef. You could not use class DeviceProxy, even if it was a pointer.
, . , . iostream . , istream , typedef basic_istream. , <iosfwd>, - basic_istream, istream typedef. , , iostream, #include <iosfwd> , #include <iostream> .