19 Jul
2006
19 Jul
'06
8:28 p.m.
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Sean Huang Sent: Wednesday, July 19, 2006 1:22 PM To: boost-users@lists.boost.org Subject: [Boost-users] [function]unwanted conversion
I was surprised that the following code compiled:
#include
int main(int argc, char argv[]) { typedef boost::function< void ( void ) > MyFunction; MyFunction test1 = char(); MyFunction test2 = 0; return 0; }
That is a funny one... I wonder if its interpreting it as a function pointer because its 0. If you try it with a non-zero value it doesn't work.