julia> a = CartesianIndex(1, 2, 3)
julia> b = [a, a, a]
3-element Vector{CartesianIndex{3}}:
CartesianIndex(1, 2, 3)
CartesianIndex(1, 2, 3)
CartesianIndex(1, 2, 3)
julia> b .+ a
ERROR: iteration is deliberately unsupported for CartesianIndex. Use `I` rather than `I...`, or use `Tuple(I)...`
# works
julia> b .+ Ref(a)
3-element Vector{CartesianIndex{3}}:
CartesianIndex(2, 4, 6)
CartesianIndex(2, 4, 6)
CartesianIndex(2, 4, 6)
# works
julia> [c + a for c in b]
3-element Vector{CartesianIndex{3}}:
CartesianIndex(2, 4, 6)
CartesianIndex(2, 4, 6)
CartesianIndex(2, 4, 6)
If iteration across the values of CarteseanIndex is not supported, shouldn't it just treat it as an atomic value in the broadcast without the need to wrap it in Ref()?