Properties are not typesafe
When you accidentally index a property with a Handle of the wrong kind, this gives no error indication at compile time.
I think VertexProperty[EdgeHandle]
etc. should not compile.
PropertyPtr::operator[]
currently has overloads for OpenVolumeMeshHandle
and size_t
arguments, IMO there should be only one function that takes the correct specific handle type.
The size_t
overload is dangerous in combination with the Handle's implicit int()
conversion, as it would still allow this kind of type unsafety, I think we should at least not keep both, if not even remove both.
This would be a backwards-incompatible change - maybe best to handle with depreciation macros?
Edited by Martin Heistermann