Boost logo

Boost :

Subject: Re: [boost] [function] minor doc issues
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2008-11-19 15:20:08

Steven Watanabe skrev:
> Thorsten Ottosen wrote:
>> // if ResultType is void
>> ResultType foo(Arg1 arg1, Arg2 arg2, ..., ArgN argN)
>> {
>> f(arg1, arg2, ..., argN);
>> }
>> I believe the "If ResultType is void" is not needed. We can return
>> void in C++.

Hm. Right, but I did get that from reading the docs. That could be said
more directly IMO. And the fix to the code would be to say

  return static_cast<ResultType>(f(arg1,....))

would that not "swallow the return value" too?


Boost list run by bdawes at, gregod at, cpdaniel at, john at