I love the concept of DRY (don\'t repeat yourself [oops]), yet C++\'s concept of header files goes against this rule of programming. Is there any drawback to defining a clas
You're not repeating yourself. You only write the code once in one header. It is repeated by the preprocessor, but that's not your problem, and it's not a violation of DRY.
If it's right to do for templates, why not for normal classes
It's not really that it's the right thing to do for templates. It's just the only one that really works in general.
Anyway, if you implement a class in a header, you get the following advantages and disadvantages:
And... that's it, really.
Most of my code tends to be in headers, but that's because most of my code is templates.