all repos — fluxbox @ 0084149c3d39d8b9562106d9bc46864e499d866a

custom fork of the fluxbox windowmanager

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
commit

0084149c3d39d8b9562106d9bc46864e499d866a

parent

f464f24eb3a5872404f60356009f466d5f79f2b1

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/fluxbox.ccsrc/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(); }