wl_array_for_each is not C++ compliant
Submitted by msisov
Assigned to Wayland bug list
We've faced an issue, when we used wl_array_for_each in our C++ wayland client implementation.
The problem is that one can't use wl_array_for_each(pos, array) when pos is passed as uint32_t*, for example, and array->data is assigned to it. In C++, one cannot just convert void* to other pointer type implicitly as in C.
Is it possible to modify the macro defined to have explicit type cast?
#define wl_array_for_each(pos, array) \ for (pos = (uint32_t*) (array)->data; \
or maybe intptr_t before (array)->data ??.
I'm not sure which one would be better, but it is to you to decide.