Base class for reference-counted output iterators

class receiverObj : public x::outputrefiteratorObj<int> {

// ...
    void operator=(int c) override;
};

outputrefiterator<int> iter=x::refiterator<receiverObj>::create();
	

x::outputrefiteratorObj defines shims for an output iterator over the class given as a template parameter. x::outputrefiteratorObj defines the operator++() and operator*() shims, and a virtual operator=() which gets defined in a subclass.

x::outputrefiterator<T> defines a reference-counted iterator to an x::outputrefiteratorObj<T>. There's also an x::outputrefiteratorptr<T>; as well as x::const_outputrefiterator<T> and x::const_outputrefiteratorptr<T> (marginally useful, since x::outputrefiteratorObj<T> does not have any const methods).

This allows non template-based implementations based on x::outputrefiterator<T> to operate on any reference-counted output iterator implemented by a x::outputrefiteratorObj<T> subclass, with the trade-off of less-optimized code that uses virtual function calls, in place of potential optimizations involving iterating of the assignment operator.