you really do not need to derive from std  less if anything  you should be deriving from std  binary function  but it is really not needed for std  set to work correctly  so i would just trash that base class 