4 ms·
Err... C++20 added concepts but not definition checking, so templates are still duck typed. That is, it is still possible for a substitution failure to occur af
by Kranar 4y ago
Err... C++20 added concepts but not definition checking, so templates are still duck typed. That is, it is still possible for a substitution failure to occur after performing a concept check. Definition checking would eliminate such failures.
In every language that I can think of that supports generic programming (including Go), there's support for definition checking.