This may be an general C++ question but:
I want to take the address of a member function
that happens to be an operator() operator, which is
defined with member templates in apply.hpp:
--------------quote----
namespace boost
{
template<class R> struct apply
{
typedef R result_type;
template<class F> result_type operator()(F & f) const
{
return f();
}
template result_type operator()(F & f, A1 & a1) const
{
return f(a1);
}
-------end quote.
I want to take the address of operator() for
which is defined by the member template above.
----Quote---
// want to work with functions of the form int f(int);
typedef int P(int);
boost::function f =
// boost::bind(boost::apply<int>(),_1,5);
// above works but instead try below!
boost::bind(&boost::apply<int>::operator(),5);
// above line produces error.
----end quote
I get error message:
exabind.cpp:23: error: no matching function for call to `bind(<unknown type>, boost::apply<int>, int)'
How do I specify a pointer to the member operator() method
defined with member template parameters ?
I must be doing something wrong. My brain hurts.
--
Paul Elliott 1(512)837-1096
pelliott@io.com PMB 181, 11900 Metric Blvd Suite J
http://www.io.com/~pelliott/pme/ Austin TX 78758-3117