struct WeaponT;
bool operator==(const Vec3 &lhs, const Vec3 &rhs);
+bool operator!=(const Vec3 &lhs, const Vec3 &rhs);
bool operator==(const MonsterT &lhs, const MonsterT &rhs);
+bool operator!=(const MonsterT &lhs, const MonsterT &rhs);
bool operator==(const WeaponT &lhs, const WeaponT &rhs);
+bool operator!=(const WeaponT &lhs, const WeaponT &rhs);
inline const flatbuffers::TypeTable *Vec3TypeTable();
}
}
}
+
+inline bool operator!=(const EquipmentUnion &lhs, const EquipmentUnion &rhs) {
+ return !(lhs == rhs);
+}
+
bool VerifyEquipment(flatbuffers::Verifier &verifier, const void *obj, Equipment type);
bool VerifyEquipmentVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
(lhs.z() == rhs.z());
}
+inline bool operator!=(const Vec3 &lhs, const Vec3 &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct MonsterT : public flatbuffers::NativeTable {
typedef Monster TableType;
flatbuffers::unique_ptr<Vec3> pos;
(lhs.equipped == rhs.equipped);
}
+inline bool operator!=(const MonsterT &lhs, const MonsterT &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef MonsterT NativeTableType;
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
(lhs.damage == rhs.damage);
}
+inline bool operator!=(const WeaponT &lhs, const WeaponT &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct Weapon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef WeaponT NativeTableType;
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
NativeName(Name(struct_def), &struct_def, parser_.opts);
code_ += "bool operator==(const " + nativeName + " &lhs, const " +
nativeName + " &rhs);";
+ code_ += "bool operator!=(const " + nativeName + " &lhs, const " +
+ nativeName + " &rhs);";
}
}
code_ += "";
code_ += " }";
code_ += " }";
code_ += "}";
+
+ code_ += "";
+ code_ +=
+ "inline bool operator!=(const {{NAME}}Union &lhs, const "
+ "{{NAME}}Union &rhs) {";
+ code_ += " return !(lhs == rhs);";
+ code_ += "}";
+ code_ += "";
}
}
"{{NATIVE_NAME}} &{{CMP_RHS}}) {";
code_ += "{{CMP_OP}}";
code_ += "}";
+
+ code_ += "";
+ code_ +=
+ "inline bool operator!=(const {{NATIVE_NAME}} &lhs, const "
+ "{{NATIVE_NAME}} &rhs) {";
+ code_ += " return !(lhs == rhs);";
+ code_ += "}";
+ code_ += "";
}
void GenOperatorNewDelete(const StructDef &struct_def) {
struct MonsterExtraT;
bool operator==(const MonsterExtraT &lhs, const MonsterExtraT &rhs);
+bool operator!=(const MonsterExtraT &lhs, const MonsterExtraT &rhs);
inline const flatbuffers::TypeTable *MonsterExtraTypeTable();
(lhs.testd_ninf == rhs.testd_ninf);
}
+inline bool operator!=(const MonsterExtraT &lhs, const MonsterExtraT &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct MonsterExtra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef MonsterExtraT NativeTableType;
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
} // namespace Example
bool operator==(const InParentNamespaceT &lhs, const InParentNamespaceT &rhs);
+bool operator!=(const InParentNamespaceT &lhs, const InParentNamespaceT &rhs);
namespace Example2 {
bool operator==(const MonsterT &lhs, const MonsterT &rhs);
+bool operator!=(const MonsterT &lhs, const MonsterT &rhs);
} // namespace Example2
namespace Example {
bool operator==(const Test &lhs, const Test &rhs);
+bool operator!=(const Test &lhs, const Test &rhs);
bool operator==(const TestSimpleTableWithEnumT &lhs, const TestSimpleTableWithEnumT &rhs);
+bool operator!=(const TestSimpleTableWithEnumT &lhs, const TestSimpleTableWithEnumT &rhs);
bool operator==(const Vec3 &lhs, const Vec3 &rhs);
+bool operator!=(const Vec3 &lhs, const Vec3 &rhs);
bool operator==(const Ability &lhs, const Ability &rhs);
+bool operator!=(const Ability &lhs, const Ability &rhs);
bool operator==(const StatT &lhs, const StatT &rhs);
+bool operator!=(const StatT &lhs, const StatT &rhs);
bool operator==(const ReferrableT &lhs, const ReferrableT &rhs);
+bool operator!=(const ReferrableT &lhs, const ReferrableT &rhs);
bool operator==(const MonsterT &lhs, const MonsterT &rhs);
+bool operator!=(const MonsterT &lhs, const MonsterT &rhs);
bool operator==(const TypeAliasesT &lhs, const TypeAliasesT &rhs);
+bool operator!=(const TypeAliasesT &lhs, const TypeAliasesT &rhs);
} // namespace Example
}
}
}
+
+inline bool operator!=(const AnyUnion &lhs, const AnyUnion &rhs) {
+ return !(lhs == rhs);
+}
+
bool VerifyAny(flatbuffers::Verifier &verifier, const void *obj, Any type);
bool VerifyAnyVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
}
}
}
+
+inline bool operator!=(const AnyUniqueAliasesUnion &lhs, const AnyUniqueAliasesUnion &rhs) {
+ return !(lhs == rhs);
+}
+
bool VerifyAnyUniqueAliases(flatbuffers::Verifier &verifier, const void *obj, AnyUniqueAliases type);
bool VerifyAnyUniqueAliasesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
}
}
}
+
+inline bool operator!=(const AnyAmbiguousAliasesUnion &lhs, const AnyAmbiguousAliasesUnion &rhs) {
+ return !(lhs == rhs);
+}
+
bool VerifyAnyAmbiguousAliases(flatbuffers::Verifier &verifier, const void *obj, AnyAmbiguousAliases type);
bool VerifyAnyAmbiguousAliasesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
(lhs.b() == rhs.b());
}
+inline bool operator!=(const Test &lhs, const Test &rhs) {
+ return !(lhs == rhs);
+}
+
+
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Vec3 FLATBUFFERS_FINAL_CLASS {
private:
float x_;
(lhs.test3() == rhs.test3());
}
+inline bool operator!=(const Vec3 &lhs, const Vec3 &rhs) {
+ return !(lhs == rhs);
+}
+
+
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Ability FLATBUFFERS_FINAL_CLASS {
private:
uint32_t id_;
(lhs.distance() == rhs.distance());
}
+inline bool operator!=(const Ability &lhs, const Ability &rhs) {
+ return !(lhs == rhs);
+}
+
+
} // namespace Example
struct InParentNamespaceT : public flatbuffers::NativeTable {
return true;
}
+inline bool operator!=(const InParentNamespaceT &lhs, const InParentNamespaceT &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct InParentNamespace FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef InParentNamespaceT NativeTableType;
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
return true;
}
+inline bool operator!=(const MonsterT &lhs, const MonsterT &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef MonsterT NativeTableType;
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
(lhs.color == rhs.color);
}
+inline bool operator!=(const TestSimpleTableWithEnumT &lhs, const TestSimpleTableWithEnumT &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct TestSimpleTableWithEnum FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef TestSimpleTableWithEnumT NativeTableType;
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
(lhs.count == rhs.count);
}
+inline bool operator!=(const StatT &lhs, const StatT &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct Stat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef StatT NativeTableType;
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
(lhs.id == rhs.id);
}
+inline bool operator!=(const ReferrableT &lhs, const ReferrableT &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct Referrable FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef ReferrableT NativeTableType;
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
(lhs.vector_of_enums == rhs.vector_of_enums);
}
+inline bool operator!=(const MonsterT &lhs, const MonsterT &rhs) {
+ return !(lhs == rhs);
+}
+
+
/// an example documentation comment: monster object
struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef MonsterT NativeTableType;
(lhs.vf64 == rhs.vf64);
}
+inline bool operator!=(const TypeAliasesT &lhs, const TypeAliasesT &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct TypeAliases FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef TypeAliasesT NativeTableType;
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
MonsterT a;
MonsterT b;
TEST_EQ(b == a, true);
+ TEST_EQ(b != a, false);
b.mana = 33;
TEST_EQ(b == a, false);
+ TEST_EQ(b != a, true);
b.mana = 150;
TEST_EQ(b == a, true);
+ TEST_EQ(b != a, false);
b.inventory.push_back(3);
TEST_EQ(b == a, false);
+ TEST_EQ(b != a, true);
b.inventory.clear();
TEST_EQ(b == a, true);
+ TEST_EQ(b != a, false);
b.test.type = Any_Monster;
TEST_EQ(b == a, false);
+ TEST_EQ(b != a, true);
}
// For testing any binaries, e.g. from fuzzing.
struct MovieT;
bool operator==(const AttackerT &lhs, const AttackerT &rhs);
+bool operator!=(const AttackerT &lhs, const AttackerT &rhs);
bool operator==(const Rapunzel &lhs, const Rapunzel &rhs);
+bool operator!=(const Rapunzel &lhs, const Rapunzel &rhs);
bool operator==(const BookReader &lhs, const BookReader &rhs);
+bool operator!=(const BookReader &lhs, const BookReader &rhs);
bool operator==(const MovieT &lhs, const MovieT &rhs);
+bool operator!=(const MovieT &lhs, const MovieT &rhs);
inline const flatbuffers::TypeTable *AttackerTypeTable();
}
}
}
+
+inline bool operator!=(const CharacterUnion &lhs, const CharacterUnion &rhs) {
+ return !(lhs == rhs);
+}
+
bool VerifyCharacter(flatbuffers::Verifier &verifier, const void *obj, Character type);
bool VerifyCharacterVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
(lhs.hair_length() == rhs.hair_length());
}
+inline bool operator!=(const Rapunzel &lhs, const Rapunzel &rhs) {
+ return !(lhs == rhs);
+}
+
+
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) BookReader FLATBUFFERS_FINAL_CLASS {
private:
int32_t books_read_;
(lhs.books_read() == rhs.books_read());
}
+inline bool operator!=(const BookReader &lhs, const BookReader &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct AttackerT : public flatbuffers::NativeTable {
typedef Attacker TableType;
int32_t sword_attack_damage;
(lhs.sword_attack_damage == rhs.sword_attack_damage);
}
+inline bool operator!=(const AttackerT &lhs, const AttackerT &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct Attacker FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef AttackerT NativeTableType;
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
(lhs.characters == rhs.characters);
}
+inline bool operator!=(const MovieT &lhs, const MovieT &rhs) {
+ return !(lhs == rhs);
+}
+
+
struct Movie FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef MovieT NativeTableType;
static const flatbuffers::TypeTable *MiniReflectTypeTable() {