On Jan 7, 2005, at 9:06 AM, Carl Nygard wrote:
On Fri, 2005-01-07 at 08:19 -0500, Douglas Gregor wrote:
On Jan 7, 2005, at 6:12 AM, Murray Cumming wrote:
3. In "Slot Binders" Can you expand on this question: "TODO: answer questions: a) What's up with the No Clue entry, anyone?", please. In fact, please just ask your TODO questions on this mailing list.
So the intent of retype() and retype_return() is to allow casting of the argument and return types of a function. Are these also required when performing implicit conversions? For instance, will the following work?
long Func3(double val, string str);
sigc::signal
sig; sig.connect(sigc::ptr_fun(&Func3)); If I'm right in assuming that the code will not compile (because the signatures do not match exactly), then the "No Clue" could be replaced by "Not Applicable", because Signals performs all of the implicit conversions.
In that case, it's supported in Boost.Bind, so retype/retype_return() is included with sigc::bind/compose/hide/group. Correct?
Implicit conversions are handled in both Boost.Bind and in Boost.Signals. I don't know enough about sigc::bind/compose/hide/group to answer the rest.
- About ptr_fun/mem_fun: you can use them in either library, if you'd like to be more explicit.
I couldn't find docs on boost.org for ptr_fun, just mem_fun. What am I missing?
Well, there's std::ptr_fun, and you could always wrap it in bind() if you wanted. ptr_fun really is just syntactic (de-?)sugar.
- About bind: bind is now in the C++ Library TR (an addendum to the standard, which should be approved in the near future), so we're forced to build on it to create any signals & slots library for the standards committee. (We'll have a long, uphill battle if we try to introduce our own special binders and don't support bind).
Do you have a link to the TR?
There is a draft here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1711.pdf If you're familiar with Boost.Function/Boost.Bind, you'll be familiar with the TR versions. Very little has changed. Doug