libcellml
libcellml copied to clipboard
Issue class: Bindings and C++ behaviour is no longer consistent
Since the Issue
class changed to return just the std::any
item from the item()
function, instead of an AnyItem
item, the behaviour of the bindings and the C++ version has diverged. We should either switch back to returning an AnyItem
item, or update the bindings. The bindings currently return a tuple containing the type enum and the item (shadowing the AnyItem structure).
Which is better? And what was the original rationale for removing the AnyItem structure from the return? @hsorby @agarny @nickerso Thoughts?
I think the bindings should be returning a single item of the type given by cellmlElementType
.
The original intention behind using a tuple/pair everywhere was to make sure that we didn't end up with orphaned std::any
items that we don't know the type for. We've lost that now ... ?