Definitions of add() and set() should be in the header file. Otherwise compilers will not optimize them.