-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Labels
Description
I just tried to create a custom type inheriting from SVector and create a custom indexing behavior (getindex(A::AbstractArray, p::MyPoint)
).
In theory, one just needs to overload:
Base.to_indices(A::AbstractArray, p::Tuple{<: Point}) = round.(Int, p[1].x)
To make this work, but because StaticArrays overloads getindex(A::AbstractArray, x::SVector)
this doesn't work anymore.
Is this just wrongly overloading the getindex interface, or was there a reason to overload getindex directly?