summaryrefslogtreecommitdiff
path: root/cpp/include/IceUtil/Config.h
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-04-18 00:14:25 +0200
committerJose <jose@zeroc.com>2018-04-18 00:21:06 +0200
commitbd7f64820c89cd535023113af08dc20fc7f41ee7 (patch)
tree69fd73adf4b0c8b33a732102f965ddff5737d860 /cpp/include/IceUtil/Config.h
parentIceGridGUI macOS JDK 10 build fixes (diff)
downloadice-bd7f64820c89cd535023113af08dc20fc7f41ee7.tar.bz2
ice-bd7f64820c89cd535023113af08dc20fc7f41ee7.tar.xz
ice-bd7f64820c89cd535023113af08dc20fc7f41ee7.zip
Fixes for C++17 compatibility
Avoid using functions that have been removed in C++17 Added ICE_CPLUSPLUS macro to workaround __cplusplus not always set with VC++ compiler Fixes #24
Diffstat (limited to 'cpp/include/IceUtil/Config.h')
-rw-r--r--cpp/include/IceUtil/Config.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h
index 01028df265a..71eb5623b82 100644
--- a/cpp/include/IceUtil/Config.h
+++ b/cpp/include/IceUtil/Config.h
@@ -158,6 +158,12 @@
# define ICE_HAS_THREAD_SAFE_LOCAL_STATIC
#endif
+#if defined(_MSVC_LANG)
+# define ICE_CPLUSPLUS _MSVC_LANG
+#else
+# define ICE_CPLUSPLUS __cplusplus
+#endif
+
//
// Compiler extensions to export and import symbols: see the documentation
// for Visual Studio, Solaris Studio and GCC.