"Lin Xu" <[EMAIL PROTECTED]> writes:

>>But you can't do that ;-)
>>
>>In particular, MemberFun<A,&A::print> is incompatible with, say,
>>MemberFun<A, &A::setz>.  You'd need something more like:
>>
>>   MemberFun<void(A::*)(), &A::print>
>>   MemberFun<void(A::*)(int), &A::setz>
>>
> Sorry, but why? The two functions have different signitures, a::print
> has a void (A::*)(), while setz has void (A::*)(int)..so they have
> different instanitations of Function:
> Function<void>::MemberFun<A,&A::print>
> Function<void,int>::MemberFun<A,&A::setz>

Oh, I didn't realize you were going to plug all the function arguments
into the Function template.

However, wouldn't writing 

         MemberFun<void(A::*)(int), &A::setz>

or even:

         MemberFun<void(A,int), &A::setz>

instead of

        Function<void, int>::MemberFun<A, &A::setz>

be a lot simpler?


> Maybe I'm missing something, or I didn't explain things well enough?

I think I just made the wrong assumptions about what your code was
trying to do.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to