Sorry for top posting here, but I didn't receive Steven's response.
I'm using i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build
5488).
The compile error I get is the following:
g++ -I/Users/jpritts/trunk/LIFEBLAST_HOME/i386-darwin-gcc-4_0/vendor/Boost/include
main.cc -o a.out
main.cc: In instantiation of 'DoesVisitorImplement
On a boost thread a while ago, I saw some code to query for the existence of a member function of a class using SFINAE and BOOST_STATIC. I guess you could call it static reflection. Below is a code snippet that does not work using the aforementioned methods. The culprit is the using Base::operator() statement in the Derived class. Apparently the base class method void operator()(float u) is not part of the type of Derived. This was a shock to me, because you can call the overloaded method from the derived class. I'd appreciate any advice on how to check for the existence of member functions in this scenario. I fear it may be impossible. Thanks!
You can convert a member function pointer of a derived class to a member function pointer of a derived class, so it ought to work. What compiler are you using? I get 1 1 Using msvc 9.0. In Christ, Steven Watanabe