This should probably just be a function in an anonymous namespace. If you feel strongly about having it as a member function, it should probably be const.