|
Boost : |
From: Thomas Witt (witt_at_[hidden])
Date: 2002-05-17 10:06:31
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 17 May 2002 16:30, Douglas Gregor wrote:
> Would something like this have helped as a note in operator()?
>
> "Calling the function call operator may invoke undefined behavior if no
> slots are connected to the signal, depending on the combiner used. The
> default combiner is well-defined for zero slots when the return type is
> void but is undefined when the return type is any other type (because there
> is no way to synthesize a return value)."
>
Yes, a lot.
>
> I think the design is correct, but maybe the default behavior is wrong. It
> might be easier for users if the default behavior handled having no slots
> more gracefully (e.g., by silently returning a default-constructed value).
I have thought about something like this. I dropped it because I felt the
return value problem is something the user should be aware of. Better he
should think about the question of what the default should be. I thinks this
is mostly a question of personal preference.
Thomas
- --
Dipl.-Ing. Thomas Witt
Institut fuer Verkehrswesen, Eisenbahnbau und -betrieb, Universitaet Hannover
voice: +49(0) 511 762 - 4273, fax: +49(0) 511 762-3001
http://www.ive.uni-hannover.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD4DBQE85Rx80ds/gS3XsBoRAlVyAKCNYCmplSujRNJxafu3nRWnmdCCdACY7Cp8
G91ppVFSfYVnjkM+P3sfCQ==
=k+XU
-----END PGP SIGNATURE-----
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk