Due to the nature of this requirement, I've made a very minimal example, which would adequately solve my issue, without resorting to use of pointers or copy constructors.
Basically I'm trying to pass an object as a reference to the template function, rather than a copy as it's seeing. I'm needing to do this without editing Obj::Call to accommodate a reference as its first parameter, as it'd break other calls.
You'll notice in the following code the object will be destroyed upon passing, while the object defined is still in-scope due to the infinite end loop.
Edit: did not read what do you need first time. What problems do you have with ref()?
Works fine for me: object is passed. But note that althought it would behave like reference, it would not have same address as original
You'll notice in the following code the object will be destroyed upon passing
You do understand that it is copy which got destroyed and not original object, do you?
EDIT 2:
Did you thy to explicitely provide template parameters? Obj::Call<Obl&>(obj);