Does this rule apply to all functions or only class member functions, because I seem to be having the same problem with templated functions?
Also if you have to define functions in the header doesn't that make templated functions awkward to use?
As for making it awkward to use, no, I would disagree. Make the header file cluttered? Yes.
In that case, you could put the implementations in a file named, say, link.inl, and #include it at
the end of link.h. This keeps the header file neater and satisfies the requirement at the same time.
I just ran a test and you were right it is not awkward--I had a misconception about how I could use headers (I am glad I made the statement because I learned something).
As for adding an include at the end that is really clever--it would never have occurred to me--thanks for the tip.