Boost logo

Boost :

Subject: Re: [boost] How to detect if f() returns void or not?
From: joel falcou (joel.falcou_at_[hidden])
Date: 2009-12-12 08:41:16

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?
> I need that to implement new type traits to detect if types can be
> compared and to detect for example operator< returning void.
> The following code compiles only with c++0x standard and keyword
> decltype but not with c++03 standard and BOOST_TYPEOF.
> Frédéric
What about using function_traits::return_type ?

Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35

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