C++ Templates, Specialization, and SFINAE
There are C++ Template programmers…and then there are all the other programmers. Unfortunately, template programming can seem like a whole ‘nuther world…with its very own language.
Here is yet another stab at making sense of it all:
C++ Templates, Specialization, and SFINAE
The Curious Thing About Duplicate Definitions in Header Files
When you put a function definition or template function specialization using template<> into a header file but outside of a class or template declaration, the compiler will generate duplicate definition or multiple definition errors.
Here’s why: The Curious Thing About Duplicate Definitions in Header Files