On 2009-09-29 07:23:54 -0400, bearophile <[email protected]> said:
This makes sense for things we definitely want to allow, such as:
void foo() { return bar(); }
where bar() is another void function.
If bar() is a void function then "return bar();" looks like a bug. Why
do you want to allow such semantically wrong situation?
It's handy in generic code because you don't need to special-case for void:
R foo(R, A...)(A a)
{
return bar(a);
}
That said, returning something other than void from a void function is
senseless.
--
Michel Fortin
[email protected]
http://michelf.com/