2 ms·
>1. What about templates? If there's a "template<T> void foo(x &T)", and it does "x++" inside, and I sometimes use it on int, sometimes on bool, how would the m
by fauigerzigerk 11y ago
>1. What about templates? If there's a "template<T> void foo(x &T)", and it does "x++" inside, and I sometimes use it on int, sometimes on bool, how would the magic wand upgrade only the bool cases to "x = true"?
Generate a new template specialization or overload? I realize this could be rather questionable if the offending operator use is somewhere in the middle of other code.