why do you need it as a class member? can it be just a free function in a nemeless manespace?