]> git.lyx.org Git - lyx.git/blobdiff - src/support/bind.h
Fix bugs #6078 and #9364
[lyx.git] / src / support / bind.h
index f613bdb40851d32329d95ad87b5b87f249fb560b..1449c4394a7e6569b77138743d606700a97ac0b6 100644 (file)
 #ifndef LYX_BIND_H
 #define LYX_BIND_H
 
-#include "checktr1.h"
+#include "support/functional.h"
 
+#ifdef LYX_USE_CXX11
 
-#ifdef LYX_USE_TR1
-
-#include <functional>
-
-#ifdef __GNUC__
-#include <tr1/functional>
-#endif
+#define LYX_BIND_NS std
 
 namespace lyx
 {
-       using std::tr1::bind;
-       using std::tr1::placeholders::_1;
-       using std::tr1::placeholders::_2;
-       using std::tr1::ref;
+       using std::placeholders::_1;
+       using std::placeholders::_2;
 }
 
 #else
 
-#include "boost/bind.hpp"
+#include <boost/bind.hpp>
+#define LYX_BIND_NS boost
+
+#endif
 
 namespace lyx
 {
-       using boost::bind;
-       using boost::ref;
+       using LYX_BIND_NS::bind;
+       using LYX_BIND_NS::ref;
 }
 
-#endif
+#undef LYX_BIND_NS
 
 
 #endif