We decided on a workaround for the output parameter references. Rather than rely on the SRL operator, we just defined a template member function overloaded for all the types we are interested. We just don't get the pretty chaining.
For example, we defined:
template<class T>bool mystream::get(T* val){ _stream >> *val;}
Where
_stream is the wrapped input stream. We registered them as overloaded functions, one for each type:
engine->RegisterObjectMethod("ifstream", "bool get(bool &out)", asMETHODPR(asCIScriptStream, get<bool>, (bool*), bool), asCALL_THISCALL);engine->RegisterObjectMethod("ifstream", "bool get(uint &out)", asMETHODPR(asCIScriptStream, get<unsigned long>, (unsigned long*), bool), asCALL_THISCALL);
etc, etc, for each type we want.
This works fine for now, and in the end, we will likely just add the extraction operator rather than remove these functions.
Thanks for generating and supporting such a fantastic piece of software! I can't say enough about how much we appreciate what you've done. Our end-users love the ability to script their testbenchs, and with the huge variety of add-ons (the preprocessor being our favorite!), we are all very thrilled.