I try to create a function. Function signature
template <typename T>
void func(int arg, T& ref1, T& ref2 = /* dummyref<T>() */ );
This function takes argument arg
and assigns something to ref1
and ref2
, but ref2
is an optional parameter. It is not used when default dummyref
object detected. How do I implement this and what dummyref
object can I use? It has to work for basic types as well (such as int
).