Doh! Thanks. Steven Watanabe wrote:
AMDG
Russell L. Carter wrote:
then I get "void value not ignored as it ought to be" at the line: "FooFunc ff = put.getFooFunc();"
I get the same thing if I try: FooFunc ff = MHBase<Put>::fooFO(put);
Here's the code:
#include
#include <iostream> class MHBAccessor { template<class> friend class MHBase; template<class Derived> static int foo(Derived& derived, int i) { return derived.foo_(i); } }; typedef boost::function
FooFunc; template <class Derived> struct MHBase { Derived& derived() { return static_cast
(*this); } int foo(int i) { return MHBAccessor::foo(this->derived(), i); }
struct fooFO { fooFO(MHBase<Derived>& mhb) : mhb_(mhb) {} void operator()(int i) { mhb_.foo(i); }
This returns void. FooFunc expects int. try
int operator()(int i) { return(mhb_.foo(i)); }
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users