<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - wl_array_for_each is not C++ compliant"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101618">101618</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>wl_array_for_each is not C++ compliant
</td>
</tr>
<tr>
<th>Product</th>
<td>Wayland
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>trivial
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>wayland
</td>
</tr>
<tr>
<th>Assignee</th>
<td>wayland-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>msisov@igalia.com
</td>
</tr></table>
<p>
<div>
<pre>Hi,
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.
Br,
msisov</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>