Re: [Boost-bugs] [Boost C++ Libraries] #13632: boost::function operator== is bugged on FreeBSD 11.2

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #13632: boost::function operator== is bugged on FreeBSD 11.2
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-07-15 16:28:36


#13632: boost::function operator== is bugged on FreeBSD 11.2
-------------------------------+----------------------------
  Reporter: hongli@… | Owner: Douglas Gregor
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: function
   Version: Boost 1.67.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------------

Comment (by anonymous):

 Important update. It was discovered that FreeBSD 11.2, as well as recent
 versions of OpenBSD, promote `NULL` to `nullptr`. Comparing an empty
 boost::function with 0 results in true, but comparing it with nullptr
 results in false:

 {{{
 boost::function<void ()> f;
 printf("is nullptr: %d\n", f == nullptr);
 printf("is 0: %d\n", f == 0);
 }}}

 This prints 0 and 1, respectively.

 Is this behavior intentional? Are we supposed to be able to compare
 boost::function with nullptr? Intuitively I would expect `== 0` and `==
 nullptr` to behave the same.

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13632#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-07-15 16:34:10 UTC