diff --git a/include/flatbuffers/stl_emulation.h b/include/flatbuffers/stl_emulation.h index 5f19eaf8d..67c6768cb 100644 --- a/include/flatbuffers/stl_emulation.h +++ b/include/flatbuffers/stl_emulation.h @@ -273,7 +273,7 @@ template FLATBUFFERS_CONSTEXPR_CPP11 bool operator==(const Optional& lhs, const Optional& rhs) FLATBUFFERS_NOEXCEPT { return static_cast(lhs) != static_cast(rhs) ? false - : !static_cast(lhs) ? false : (*lhs == *rhs); + : !static_cast(lhs) ? true : (*lhs == *rhs); } #endif // FLATBUFFERS_USE_STD_OPTIONAL