Subject: Re: [boost] [functional] Interested in can_be_called<F, Sig> metafunction?
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2012-11-04 23:37:10
On Sun, Nov 4, 2012 at 11:28 PM, TONGARI <tongari95_at_[hidden]> wrote:
> 2012/11/5 Matt Calabrese <rivorus_at_[hidden]>
> > So, instead of specifying the return type when invoking the metafunction,
> > it automatically defines an associated type "result_type," which a
> > programmer could then check against if he or she desired. Again, your
> > implementation may be more useful depending on the context, but this is
> > something to consider.
> In the case that return type is unimportant, just leave it as void, e.g.
> can_be_called<F, void(Args...)>
> BTW, the Boost.Generic Definition column in your page seems to use ",,,"
> instead of "..." for
> VA, is that true?
Yes, that's true. The code in the documentation is pulled directly from the
library code, which is tested, so what's documented should always be
correct. That is also why in some of the documentation you might see
workarounds or little bits commented out that I can't support yet). The
reason it's ",,," and not "..." is because it's impossible to detect "..."
in the preprocessor. On the other hand, ",,," can be detected by passing
the data to a variadic macro and seeing if it contains a group of empty
arguments in a row.
-- -Matt Calabrese
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk