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-20 03:10:02


Eric Niebler wrote:
> The only solution would be to modify the bind function object so that
> its operator() refused to accept arguments that its bound function
> doesn't also accept. This can be done with SFINAE using something akin
> to can_be_called. I'm not suggesting that such a change be made to
> Boost.Bind, but it would have one advantage: if users try to pass
> unacceptable arguments, the resulting error would point to the
> offending line in *their* code rather than someplace deep in Boost.Bind.
Can can_be_called become a first class Boost citizen in type_traits or
some such ? Sounds like there is a substantial number of use cases in
which it may help.

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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk