]> git.cworth.org Git - notmuch/blobdiff - lib/notmuch-private.h
lib: define macro NODISCARD
[notmuch] / lib / notmuch-private.h
index c63cfe5e698fa6f087c53cd52abc159360320622..1c2290b24847d8a55f957e2049c8cf3da64f78f8 100644 (file)
@@ -750,6 +750,12 @@ _notmuch_talloc_steal (const void *new_ctx, const T *ptr)
 #undef talloc_steal
 #define talloc_steal _notmuch_talloc_steal
 #endif
 #undef talloc_steal
 #define talloc_steal _notmuch_talloc_steal
 #endif
+
+#if __cplusplus >= 201703L || __cppcheck__
+#define NODISCARD [[nodiscard]]
+#else
+#define NODISCARD /**/
+#endif
 #endif
 
 #endif
 #endif
 
 #endif