#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_TR1
+
+namespace lyx
+{
+ using std::tr1::bind;
+ using std::tr1::placeholders::_1;
+ using std::tr1::placeholders::_2;
+ using std::tr1::ref;
+}
#else
-#include "support/bind.h"
-using boost::bind;
-using boost::_1;
-using boost::_2;
-using boost::ref;
+#include <boost/bind.hpp>
+
+namespace lyx
+{
+ using boost::bind;
+ using boost::ref;
+}
#endif