Boost logo

Boost :

Subject: Re: [boost] How to detect if f() returns void or not?
From: Eric Niebler (eric_at_[hidden])
Date: 2009-12-13 15:10:57

Frédéric Bron wrote:
>>>> This does not check for return type but just ignores it with the
>>>> operator, trick. In the end, you do not know if fun(a,b) return void
>>>> or not.
>>> I find your lack of faith disturbing.
> I am very sorry for that, I did not want to hurt you; I was too rude.

Oh, no worries! You missed the Star Wars reference. I was making a joke,
not actually upset. :-)

> This just shows how far I am from your practice of C++ because the
> fact that I understood the operator, trick did not make me think of
> how to use it to perform what I wanted. I have now read carrefully
> your proposed code and it works!
> I am now able ot make the has_operator_xxxx traits work for any
> return type. So thank you very much and many kudos for your kind help.

Excellent. Glad to be of service.

Eric Niebler
BoostPro Computing

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