Boost logo

Boost Users :

Subject: Re: [Boost-users] [FunctionTypes] function_arity for non-built-ins
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2011-01-06 08:38:54


2011/1/6 Hossein Haeri <powerprogman_at_[hidden]>

> I need to know whether a function object is callable with a given set of
> arguments. Obviously, the compiler will automatically let me know if it's
> not. Yet, the place where the compiler points my clients to is likely not to
> be suitable for them. So, the idea is to stop them at an appropriate point
> in my own code (perhaps with some appropriate error message and commenting)
> before the compiler nags about the unsuitability of the (function object)
> instantiation.
>
> It will perhaps be a good starting point if I can check it before further
> the actual template instantiation of the function object. Any ideas now
> please?

This is actually possible in most cases. Check this nice article by Eric
Niebler:
http://www.boost.org/doc/libs/1_45_0/doc/html/proto/appendices.html#boost_proto.appendices.implementation.function_arity

Roman Perepelitsa.



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