def METHOD_NAME(nfields):
    print("#define RDB_MAKE_ME_EQUALITY_COMPARABLE_%d(type_t%s) \\" % \
        (nfields, "".join(", field%d" % (i + 1) for i in xrange(nfields))))
    unused = "UNUSED " if nfields == 0 else ""
    print("    bool operator==(%sconst type_t &_a_) const { \\" % unused)
    if nfields == 0:
        print("        return true; \\")
    else:
        print("        return " + " && ".join("field%d == _a_.field%d" % (i + 1, i + 1) for i in xrange(nfields)) + "; \\")
    print("    } \\")
    print("    friend class equality_force_semicolon_declaration_t")