Boost logo

Boost Users :

From: Stjepan Rajko (stipe_at_[hidden])
Date: 2008-08-11 12:25:08


On Mon, Aug 11, 2008 at 9:05 AM, joel falcou <joel.falcou_at_[hidden]> wrote:
>
> Yes, I thought that the
> boost::result_of protocol needed the result struct to be a one argument
> template only. I forgot about default argument and such.
>
> Well,
> I used some preprocessor magic and got this :
> http://codepad.org/VrLTKmJO
>
> Should do the tric IMHO. Comments
> on how to simplify this is of course welcomed.
> If it's of some
> interest, I can make a proper file to be included in the proper boost
> library (maybe next to result_of ?)
>

What is your use case? I found this sort of thing useful for finding
out whether result_of would work for a specific set of arguments. Is
your metafunction intended for testing whether result_of would work
for _some_ (whichever) set of arguments? (it doesn't quite do that
because it doesn't check that result has a nested type typedef).

Stjepan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net