Re: [sigc] How to use sigc::bind<>



Am 2003.11.09 17:02 schrieb(en) Murray Cumming Comneon com:
> From: Martin Schulze [mailto:martin-ml hippogriff de]
> 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,
> "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.

At the moment, in libsigc++ 1.2, SigC::bind() with no number means
"bind the
last argument". That's by far the most common case, and I'm happy as
long as
that works. The rest should be documented, but I don't think anybody
is
going to use it.

Unfortunately, C++ doesn't allow us to specify default template
arguments for functions. Therefore, the number always needs to be
specified. Or does somebody know a trick to make the number optional?

Regards,

  Martin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]