Re: [sigc] How to use sigc::bind<>
- From: Martin Schulze <martin-ml hippogriff de>
- To: Jeff Franks <jcf tpg com au>
- Cc: Murray Cumming Comneon com, libsigc-list gnome org
- Subject: Re: [sigc] How to use sigc::bind<>
- Date: Sun, 9 Nov 2003 19:01:24 +0100
Am 2003.11.09 17:10 schrieb(en) Jeff Franks:
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.
The problem with this is that the number is mandatory so that you
needed to write sigc::bind<-1>(...) for the most common case.
Hm, does anybody find this worse than sigc::bind<0>(...)?
Martin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]