#ifndef LYX_BIND_H
#define LYX_BIND_H
-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
+#include "support/functional.h"
-#include <functional>
-using std::tr1::bind;
-using std::tr1::placeholders::_1;
-using std::tr1::placeholders::_2;
-using std::tr1::ref;
+#ifdef LYX_USE_CXX11
+
+#define LYX_BIND_NS std
+
+namespace lyx
+{
+ using std::placeholders::_1;
+ using std::placeholders::_2;
+}
#else
-#include "support/bind.h"
-using boost::bind;
-using boost::_1;
-using boost::_2;
-using boost::ref;
+#include <boost/bind.hpp>
+#define LYX_BIND_NS boost
#endif
+namespace lyx
+{
+ using LYX_BIND_NS::bind;
+ using LYX_BIND_NS::ref;
+}
+
+#undef LYX_BIND_NS
+
#endif