
6 Jul
2011
6 Jul
'11
5 a.m.
2011/7/5 Frédéric Bron <frederic.bron@m4x.org>
template <class T> void g(T) { std::cout<<"g(T)\n"; } ?
I cannot use that because I want in that particular case g(...) be chosen.
I think you need to reproduce your exact case. Your code above can not tell anyone what is actually going on.
I maybe forgot to say that I want g(...) to be chosen for T=const int&.
I don't think that's gonna happen; rvalues (at least with no cv qualifiers) are always bindable to reference-to-consts (but, evidently, not reference-to-const-volatiles...), and certainly preferable to (...). - Jeff