summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/optional/StringView.h
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-09-07 18:47:28 +0200
committerJose <jose@zeroc.com>2018-09-07 18:47:28 +0200
commit8cddd264e57ab89fc4c6952b2b390457a4bfbedf (patch)
tree66bb34aa13289ed0017a9460e800740516bb1278 /cpp/test/Ice/optional/StringView.h
parentEnable test workers for PHP, Ruby and Python (diff)
downloadice-8cddd264e57ab89fc4c6952b2b390457a4bfbedf.tar.bz2
ice-8cddd264e57ab89fc4c6952b2b390457a4bfbedf.tar.xz
ice-8cddd264e57ab89fc4c6952b2b390457a4bfbedf.zip
Fixes for C++17 mode
Close #180
Diffstat (limited to 'cpp/test/Ice/optional/StringView.h')
-rw-r--r--cpp/test/Ice/optional/StringView.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp/test/Ice/optional/StringView.h b/cpp/test/Ice/optional/StringView.h
index 18ac2d2bd80..29a67c201b1 100644
--- a/cpp/test/Ice/optional/StringView.h
+++ b/cpp/test/Ice/optional/StringView.h
@@ -12,6 +12,15 @@
#include <Ice/Ice.h>
+//
+// COMPILERFIX: G++ false positive "maybe-uninitialized" warnings when using
+// string_view with Ice::optional in C++17 mode.
+//
+#if defined(__GNUC__) && ICE_CPLUSPLUS >= 201703L
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
+
namespace Util
{
@@ -186,4 +195,8 @@ struct StreamHelper<Util::string_view, StreamHelperCategoryBuiltin>
}
+#if defined(__GNUC__) && ICE_CPLUSPLUS >= 201703L
+# pragma GCC diagnostic pop
+#endif
+
#endif