How we can force a function to be called only once. I can do this using some static variable or using boost library, but is there some other way to do this as I don't want to use any of the earlier way. Function is a non member function of any class.