Fix build with older boost.
authorCarl Hetherington <cth@carlh.net>
Thu, 15 Jul 2021 23:08:17 +0000 (01:08 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 15 Jul 2021 23:08:17 +0000 (01:08 +0200)
src/wx/dcpomatic_spin_ctrl.cc

index 05f13a7d91644d9830c7557880f3e02c6c715c60..a050704104ee74e3a331d21a862ace98e4901daf 100644 (file)
 
 #include "dcpomatic_spin_ctrl.h"
 #include <boost/bind/bind.hpp>
 
 #include "dcpomatic_spin_ctrl.h"
 #include <boost/bind/bind.hpp>
+#include <boost/version.hpp>
 #include <wx/wx.h>
 
 #include <wx/wx.h>
 
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
+
 
 SpinCtrl::SpinCtrl (wxWindow* parent, int width)
        : wxSpinCtrl (parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(width, -1), wxSP_ARROW_KEYS | wxTE_PROCESS_ENTER)
 
 SpinCtrl::SpinCtrl (wxWindow* parent, int width)
        : wxSpinCtrl (parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(width, -1), wxSP_ARROW_KEYS | wxTE_PROCESS_ENTER)
@@ -30,6 +35,6 @@ SpinCtrl::SpinCtrl (wxWindow* parent, int width)
        auto enter = [](wxCommandEvent& ev) {
                dynamic_cast<wxWindow*>(ev.GetEventObject())->Navigate();
        };
        auto enter = [](wxCommandEvent& ev) {
                dynamic_cast<wxWindow*>(ev.GetEventObject())->Navigate();
        };
-       Bind (wxEVT_TEXT_ENTER, boost::bind<void>(enter, boost::placeholders::_1));
+       Bind (wxEVT_TEXT_ENTER, boost::bind<void>(enter, _1));
 }
 
 }