This commit has its date moved to earlier to reflect when the work was completed, as I forgot to actually make the commit until 2 minutes after midnight :/. It partially fixed a bug where ADT requires equality for its member types but won't use templated equality to be if there isn't a regular equality operator (not templated) it always returns false
This commit is contained in:
@@ -358,7 +358,12 @@ std::pair<std::string, std::string> CGenerator::generateTranslationUnit(std::str
|
||||
// Remember, we don't destruct copy_constructTemporary because the function will do that
|
||||
functionDefinitions += "}\n";
|
||||
} else {
|
||||
functionDefinitions += " equal = this->" + prefixed_option_name + " == in->" + prefixed_option_name + ";\n}\n";
|
||||
// if we're an object type but don't define an equality function (or, as is a current bug, that function is a template)
|
||||
// we just say always false/unequal
|
||||
if (child->getDataRef()->valueType->typeDefinition)
|
||||
functionDefinitions += " equal = false;\n}\n";
|
||||
else
|
||||
functionDefinitions += " equal = this->" + prefixed_option_name + " == in->" + prefixed_option_name + ";\n}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user