Boost logo

Boost Users :

From: Sohail Somani (s.somani_at_[hidden])
Date: 2006-07-19 16:28:15


> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Sean Huang
> Sent: Wednesday, July 19, 2006 1:22 PM
> To: boost-users_at_[hidden]
> Subject: [Boost-users] [function]unwanted conversion
>
> I was surprised that the following code compiled:
>
> #include <boost/function.hpp>
>
> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net