Note that it does require some casts to ints now, but that's OK.
Hmm, somehow I thought everything that was serialized to a .blend file as an enum value needed to be declared in this style in a DNA_.h file. But I guess not. OK, I'll make this change,…
Thanks. I thought I had seen something in the style guide about doing this, but when I looked again, I couldn't find it.
I found a better way to do what I needed to do without requiring the const_cast. The strange code before was there because I was using two_meshes for mixed purposes.
You are right, so I removed the .as_span()'s here. (There is an earlier case of a ? : operation where it was needed).
I think I may want to implement the intersecting edges return at some point (if users complain), so would like to leave this as is for now.
changed n to meshes_num and used meshes.index_range() in loops.