I'm having a bit of trouble understand exactly what you want, but this might be an option:
template<typename T>
void func(T &&m) {
// ...
}
T&&
has been dubbed "universal reference" as it will bind to both lvalues and rvalues due to reference collapsing rules.