Re: [sigc] How to use sigc::bind<>
- From: Jeff Franks <jcf tpg com au>
- To: Martin Schulze <martin-ml hippogriff de>
- Cc: Murray Cumming Comneon com, libsigc-list gnome org
- Subject: Re: [sigc] How to use sigc::bind<>
- Date: Mon, 10 Nov 2003 03:10:56 +1100
Martin Schulze wrote:
1) It is a neat feature to able to specify the number of the argument
to be fixed.
2) There _needs_ to be a magical number for # specifying that the
the last argument should be fixed for convenience and for the case
that the number of arguments is not known.
The current syntax is
"0" for the last argument,
"1" for the first,
"2" for the second,
etc.
The only alternative to the current syntax I see is to use
"-1" for the last argument,
Strangely enough, std::string defines ((size_t)-1) as npos, to imply the
end of a string, so -1 does seem a natural choice.
"0" for the first,
"1" for the second,
etc.
I prefer it the way it is currently implemented. IMO, it is very
straight-forward. Propositions for a different syntax are welcome.
I guess it doesn't really matter what the method used is as long as it's
documented clearly. For me though, I have trouble wrapping my brain
around zero meaning the end.
Regards,
Jeff Franks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]