
Hello, I'm wondering if there is a way to force boost::function to only accept functions/functors with the exact same signature. I need this because there are cases in my program where passing a function with a different but convertible signature is almost certainly an error, and it would really be nice if such uses triggered a compiler error. For instance, boost::function will readily convert a mutator function with this signature: T mutate(const T&) to a function with this signature: void mutate(T&) even though the two functions clearly have different semantics. I know I could force the signatures to be the same by simply using a plain function pointer, but I want to give the user the flexibility to pass in function objects (functors) as well. Any suggestions? Cheers, Nate. _________________________________________________________________ Got a phone? Get Hotmail & Messenger for mobile! http://go.microsoft.com/?linkid=9724464