Constify the type passed to std::equal_to. std::bind2nd() has problems with the existing call because it uses the argument type passed to std::equal_to() in std::binder2nd()'s constructor, but WinClient* does not have the const specifier that `client' does. The call works fine with libstdc++ because of the way it implements std::bind2nd(), but fails with libc++ and possibly with other STL implementations as well.
Raphael Kubo da Costa rakuco@FreeBSD.org
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -1359,7 +1359,7 @@ bool Fluxbox::validateClient(const WinClient *client) const {
WinClientMap::const_iterator it = find_if(m_window_search.begin(), m_window_search.end(), - Compose(bind2nd(equal_to<WinClient *>(), client), + Compose(bind2nd(equal_to<const WinClient *>(), client), Select2nd<WinClientMap::value_type>())); return it != m_window_search.end(); }