Boost logo

Boost Users :

Subject: Re: [Boost-users] [concept check][mpl] (Conditional) Concept checking for functions
From: Jesse Perla (jesseperla_at_[hidden])
Date: 2009-03-31 09:06:34


On Mon, Mar 30, 2009 at 10:41 PM, Steven Watanabe <watanabesj_at_[hidden]>wrote:

> You could do it like this, but I doubt the error messages
> from deep inside boost::function will be very helpful.
>

> template<class BoostF, class F>
> class CheckFunctionCompatible {
> public:
> BOOST_CONCEPT_USAGE(CheckFunctionCompatible) {
> BoostF test(f);
> }
> private:
> F f;
> };
>
> In Christ,
> Steven Watanabe
>

Steven,
Thanks as always.

Is there any way to turn this into a metafunction predicate? I don't mind
hardcoding a specific boost::function predicate for each function I am
testing, which might be a better idea anyways for clarity.

Thanks,
Jesse



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