message: Generate flags == before struct ==
diff: @@ -83,6 +83,20 @@ namespace RPG {
  {%- endif %}
  {%- endfor %}
  };
  + {%- for field in fields[struct_name]|field_is_used %}
  + {%- if not field.size %}
  + {%- if field.type.endswith("_Flags") %}
  +
  + inline bool operator==(const {{ struct_name }}::Flags& l, const {{ struct_name }}::Flags& r) {
  + return l.flags == r.flags;
  + }
  +
  + inline bool operator!=(const {{ struct_name }}::Flags& l, const {{ struct_name }}::Flags& r) {
  + return !(l == r);
  + }
  + {%- endif %}
  + {%- endif %}
  + {%- endfor %}
  {%- if is_comparable %}
  inline bool operator==(const {{ struct_name }}& l, const {{ struct_name }}& r) {
  @@ -99,21 +113,6 @@ namespace RPG {
  return !(l == r);
  }
  {%- endif %}
  -
  - {%- for field in fields[struct_name]|field_is_used %}
  - {%- if not field.size %}
  - {%- if field.type.endswith("_Flags") %}
  -
  - inline bool operator==(const {{ struct_name }}::Flags& l, const {{ struct_name }}::Flags& r) {
  - return l.flags == r.flags;
  - }
  -
  - inline bool operator!=(const {{ struct_name }}::Flags& l, const {{ struct_name }}::Flags& r) {
  - return !(l == r);
  - }
  - {%- endif %}
  - {%- endif %}
  - {%- endfor %}
  }
  #endif
  