Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
authorAlex Zolotarev <alex@mapswithme.com>2014-08-06 00:31:02 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:23:42 +0300
commita43d4251fd32b88569884ca41d4ba22e3de8b045 (patch)
treef93e85a40fa718a54b5fe58e5bfef7110b237048 /std
parent63c2234ba46f95020f158a440dc675c8b6e16c0a (diff)
Base libraries C++11 sources compatibility
Diffstat (limited to 'std')
-rw-r--r--std/bind.hpp16
-rw-r--r--std/function.hpp13
-rw-r--r--std/target_os.hpp5
3 files changed, 31 insertions, 3 deletions
diff --git a/std/bind.hpp b/std/bind.hpp
index 5968b26bd1..88a9e85cff 100644
--- a/std/bind.hpp
+++ b/std/bind.hpp
@@ -6,6 +6,20 @@
#undef new
#endif
+#if __cplusplus > 199711L
+
+#include <functional>
+using std::bind;
+using std::ref;
+using std::cref;
+using std::placeholders::_1;
+using std::placeholders::_2;
+using std::placeholders::_3;
+using std::placeholders::_4;
+using std::placeholders::_5;
+
+#else
+
#ifdef OMIM_OS_WINDOWS
#define BOOST_BIND_ENABLE_STDCALL
#endif
@@ -15,6 +29,8 @@ using boost::bind;
using boost::ref;
using boost::cref;
+#endif
+
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
diff --git a/std/function.hpp b/std/function.hpp
index 924b3a7b07..ca461298d5 100644
--- a/std/function.hpp
+++ b/std/function.hpp
@@ -5,8 +5,17 @@
#undef new
#endif
-#include <boost/function.hpp>
-using boost::function;
+#if __cplusplus > 199711L
+
+ #include <functional>
+ using std::function;
+
+#else
+
+ #include <boost/function.hpp>
+ using boost::function;
+
+#endif
#ifdef DEBUG_NEW
#define new DEBUG_NEW
diff --git a/std/target_os.hpp b/std/target_os.hpp
index 46e501505f..9474dedc24 100644
--- a/std/target_os.hpp
+++ b/std/target_os.hpp
@@ -28,7 +28,10 @@
#define OMIM_OS_NAME "mac"
#define OMIM_OS_DESKTOP
#endif
- #define OMIM_HAS_DEBUG_STL 1
+
+ #if __cplusplus <= 199711L
+ #define OMIM_HAS_DEBUG_STL 1
+ #endif
#elif defined(_WIN32)
#define OMIM_OS_WINDOWS