Boost Users :
From: Zeljko Vrba (zvrba_at_[hidden])
Date: 2005-08-03 12:48:37
I hope the MPL label is right. At least the question has *some*
relevance to metaprogramming.
Basically, I need to find out whether a certain function F over a
certain type is defined, and if yes, take its address.
Input: the type T, and function NAME F.
Output: pointer to F if Ret F(T, T& or T const&; or two arguments) is
defined, 0 otherwise. The function can return anything, including void.
Variations in input:
- the function may take T, T&, or T const&
- if possible, the method should work for user-defined operators (my C++
is a bit rusty in this area - is it at all possible to take an address
of an overloaded operator?) I guess the F would then be named, e.g.
If the general case is hard to work out, it's OK to have the solution
just for Ret F(T const&) and Ret F(T const&, T const&).
I hope the question is clear enough :)
Thanks for your time and answers.
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