Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8712: [function] Comparison with nullptr differs from std::function<>
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-01-27 11:01:20
#8712: [function] Comparison with nullptr differs from std::function<>
-------------------------------+---------------------------
Reporter: boost@⦠| Owner: dgregor
Type: Bugs | Status: new
Milestone: To Be Determined | Component: function
Version: Boost 1.53.0 | Severity: Problem
Resolution: | Keywords: nullptr C++11
-------------------------------+---------------------------
Comment (by Ryan.Livingston@â¦):
Just encountered this in our code base. We ran clang-tidy with modernize-
use-nullptr which converted some code from:
{{{
if (aBoostFunction == NULL) {
...
} else {
aBoostFunction(...);
}
}}}
to:
{{{
if (aBoostFunction == nullptr) {
...
} else {
aBoostFunction(...);
}
}}}
This change caused the comparison to return false as shown above and the
empty function was invoked.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8712#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 : 2017-02-16 18:50:20 UTC