C++: mitigate matching error on generics containing an expression