]> git.lyx.org Git - lyx.git/blobdiff - src/support/functional.h
Fix build with GNU libstdc++ C++11 ABI
[lyx.git] / src / support / functional.h
index 47d9c4596646169be53ff5b56a3f9625352b0891..b86551d6f609a49e2db107e1baa9f93b71660ef2 100644 (file)
 #ifndef LYX_FUNCTIONAL_H
 #define LYX_FUNCTIONAL_H
 
-#ifdef LYX_USE_TR1
+#if __cplusplus >= 201103L
 
 #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