summaryrefslogtreecommitdiff
path: root/cpp/include
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-06-26 20:46:51 +0200
committerJose <jose@zeroc.com>2019-06-26 20:46:51 +0200
commit7c8a807ab14109364d7e0a2a63b984eba41f326c (patch)
tree1d725f06805b8ebdf5e86beacc8aa36ac2509f96 /cpp/include
parentFix macOS build failures in debug mode (diff)
downloadice-7c8a807ab14109364d7e0a2a63b984eba41f326c.tar.bz2
ice-7c8a807ab14109364d7e0a2a63b984eba41f326c.tar.xz
ice-7c8a807ab14109364d7e0a2a63b984eba41f326c.zip
Disable conversion warning in include/Ice/Optional.h debug build
Diffstat (limited to 'cpp/include')
-rw-r--r--cpp/include/Ice/Optional.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpp/include/Ice/Optional.h b/cpp/include/Ice/Optional.h
index 083faeaa9f0..059c309c39b 100644
--- a/cpp/include/Ice/Optional.h
+++ b/cpp/include/Ice/Optional.h
@@ -540,10 +540,21 @@ public:
return dataptr();
}
+ //
+ // WORKAROUND error: implicit conversion turns string literal into bool
+ //
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wconversion"
+#endif
constexpr T const& operator *() const {
return TR2_OPTIONAL_ASSERTED_EXPRESSION(initialized(), contained_val());
}
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#endif
+
T& operator *() {
assert (initialized());
return contained_val();