]> git.lyx.org Git - lyx.git/blobdiff - src/support/functional.h
Fix bugs #6078 and #9364
[lyx.git] / src / support / functional.h
index 47d9c4596646169be53ff5b56a3f9625352b0891..5d373d1d14b2cf4e85a0476660e0578a1207800a 100644 (file)
 #ifndef LYX_FUNCTIONAL_H
 #define LYX_FUNCTIONAL_H
 
-#ifdef LYX_USE_TR1
+#ifdef LYX_USE_CXX11
 
 #include <functional>
-
-#ifdef __GNUC__
-#include <tr1/functional>
-#endif
-
-namespace lyx
-{
-       using std::tr1::function;
-}
+#define LYX_FUNCTIONAL_NS std
 
 #else
 
 #include <boost/function.hpp>
 #include <boost/functional.hpp>
+#define LYX_FUNCTIONAL_NS boost
+
+#endif
 
 namespace lyx
 {
-       using boost::function;
+       using LYX_FUNCTIONAL_NS::function;
 }
 
-#endif
+#undef LYX_FUNCTIONAL_NS
 
 
 #endif