Open nano-o opened 4 years ago
That's a really painful bug. Structs have to have computable equality. So if a struct has a function member, then the function's domain has to be of a type that is iterable. So far, so good. The problem is that the equality comparator is a static overload in C++. But the size parameter of type elem
is a non-static member of the class, so the equality comparator can't access it to iterate over elem
. So there are few bad options:
1) Make equality comparison a non-static member function 2) Make the size parameter static 3) Store the size parameter in the struct
Probably the last is the least disruptive option. It might take a while to get this fixed, though.
Hello, ivyc generates invalid C++ code on the example below. Should it be working?