Allow template functions to resolve type implicitly and/or specialization
gamedev.net
We can now (for example) define a function like T Min<T>(T x, T y), but if we compile something like Min(1, 2), we get Template Min expects 1 sub type(s). This is somewhat expected, but it would be nice if we could implement generic functions alongside their older counterparts, to make it easier to modernize to these new APIs.I'm fine with the requirement of doing something like Min<int>(1, 2), but requiring this breaks a
0 Комментарии ·0 Поделились ·40 Просмотры