I am writing a unique identifier generator that has different strategies for generating an identifier that are unique every other day or week or month. I do not want to create a class hierarchy with a virtual function mechanism
Does something like the code snippet below, good idea? Any suggestions?
enum Duration { Day, Week, Month }; template <Duration d> class IDGenerator { generateId(); }
source share