Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 44 by
tha...@chromium.org: VCD_COMPILE_ASSERT warns with
-Wunused-local-typedef
https://code.google.com/p/open-vcdiff/issues/detail?id=44
Both gcc and clang warn on unused typedefs in recent versions.
VCD_COMPILE_ASSERT triggers this. Please apply this patch to fix this for
projects using c++11 (like e.g. chromium):
diff --git a/src/compile_assert.h b/src/compile_assert.h
index 3f4344f..86a1269 100644
--- a/src/compile_assert.h
+++ b/src/compile_assert.h
@@ -46,9 +46,13 @@ struct CompileAssert {
} // namespace open_vcdiff
+#if __cplusplus >= 201103L
+#define VCD_COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
+#else
#define VCD_COMPILE_ASSERT(expr, msg) \
typedef open_vcdiff::CompileAssert<static_cast<bool>(expr)> \
msg[static_cast<bool>(expr) ? 1 : -1]
+#endif
// Implementation details of VCD_COMPILE_ASSERT:
//
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings