From 038ea7c1d37cccac23ff962d8dcf62f6bce2a67f Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Wed, 1 Jun 2016 10:05:27 +0300 Subject: [PATCH] Add ! operator --- include/flatbuffers/flatbuffers.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index b6260b6d5..e487fe4d6 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -1509,6 +1509,10 @@ volatile __attribute__((weak)) const char *flatbuffer_version_string = inline E operator ^= (E &lhs, E rhs){\ lhs = lhs ^ rhs;\ return lhs;\ + }\ + inline bool operator !(E rhs) \ + {\ + return !bool(T(rhs)); \ } /// @endcond } // namespace flatbuffers