$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [function] function wrapping with noexceptionsafetyguarantee
From: Domagoj Saric (dsaritz_at_[hidden])
Date: 2010-10-23 15:01:13
"Edward Diener" <eldiener_at_[hidden]> wrote in message
news:i9tsoi$7m2$1_at_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