Re: [sigc] Clarifying the behavior of sigc::slot_base::operator bool



Am Mittwoch, den 23.09.2009, 17:27 -0700 schrieb James Lin:
> Hello,
> 
> What should the expected output be for:
> 
>    void bar(void) { }
> 
>    sigc::slot<void> foo = sigc::ptr_fun(&bar);
>    foo = sigc::slot<void>();
> 
>    std::cout << bool(foo) << std::endl;
> 

This looks like a bug to me.  At least if

   sigc::slot<void> foo;
   std::cout << bool(foo) << std::endl;

outputs 0 instead.

--Daniel




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