
"Edward Diener" <eldiener@tropicsoft.com> wrote in message news:i9tsoi$7m2$1@dough.gmane.org...
I do not understand why others are upset that invoking boost::function on an empty target should throw an exception. It is equivalent in my mind to calling a function through a function pointer which is null.
Short recap of some of the problems (with the current implementation) WRT to the throw-on-empty issue: - the way the throwing is implemented is inefficient (both in terms of speed and template code bloat) - the check and throwing may be entirely redundant if the calling code already checks/ensures that it does not call an empty function - there is no way to choose a different on-empty behaviour ... -- "What Huxley teaches is that in the age of advanced technology, spiritual devastation is more likely to come from an enemy with a smiling face than from one whose countenance exudes suspicion and hate." Neil Postman