I'm using it in the context of templates inheritance. see trader_manager.h. if you still prefer to use ValueError, I can change it.