Subject: Re: [boost] How to detect if f() returns void or not?
From: Edward Diener (eldiener_at_[hidden])
Date: 2009-12-15 00:28:14


David Abrahams wrote:
> On Dec 14, 2009, at 8:40 PM, Edward Diener wrote:
>
>> Eric Niebler wrote:
>>> Frédéric Bron wrote:
>>>> I would like to detect if the return type of a function is void or not
>>>> within C++03 standard?
>>> <snip>
>>> I solved this problem once while writing a different trait and documented it here:
>>> http://www.boost.org/doc/libs/1_41_0/doc/html/proto/appendices.html#boost_proto.appendices.implementation.function_arity
>> It's extremely clever, as others have noted, but I am wondering if there is any website, or possibly newsgroup, devoted to advanced TMP techniques such as yours.
>
> We had a short discussion of the limitations of that technique here: http://cpp-next.com/archive/2009/10/this-week-in-boost/comment-page-1/#comment-228

I don't understand from your link what those limitations are, although
it appears it revolves around the comma operator technique used by Eric
Niebler in his example.