<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/127335>127335</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
omp declare mapper does not work with templates
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bschulz81
</td>
</tr>
</table>
<pre>
reproducer:
#include "omp.h"
template <typename T>
struct myvec
{
size_t len;
T *data;
};
#pragma omp declare mapper(myvec_t<T> v) \
map(v, v.data[0:v.len])
int main()
{
return 0;
}
> /home/benni/projects/openmptestnew/openmpoffloatest/main.cpp
/home/benni/projects/openmptestnew/openmpoffloatest/main.cpp:10:36: error: use of undeclared identifier 'T'
10 | #pragma omp declare mapper(myvec_t<T> v) \
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysU81utDgQfJrm0goybRzgwGEyCU-Qe-SBnsG7_pNtJkqefsXMZHPY2-qTkICiqaruauuczcUzj6BeQL1WeitrSOMpz-tmv_umOoXla0wcU1i2mRPIA4jbRdL42W4LIxAFF-sViO7fCrtodWEEeSxfkb12jO8g30AccknbXNB9XXneq7sXEAdExGy--aOgZQ_yB3tHoMOii75D0L0-Hm76MemL0xhcxIVnqxOj0zFyAupv_B8F5HHXxSvQgKCOO6_TEai_Ah3xWt_I1YsAebjWu7Z6BRruEsYXdNp4oP6B3cwmLlvyKH493Q3JNwSa1uAYaDqx9wZoiin8xXPJQFOI7F0snIvnz3_fw_lsg95RoGlXq-cYb_39ISp5aPbu5DPIA3JKYc8Qt8wYzrj5x-QWNAv7Ys6GEwJ170DdPYRGIHRH_H_zrpZRLoMcdMVj08nhWbZN31brKNuh68RAy9I2QshWyIFlP5DqFPXtrCozkiAlqFGNaqVo6163Ta8a4rNsheqfoRXstLG1tVdXh3SpTM4bjw11UqrK6hPb_LPWadyrnk7bJUMrrMkl__5XTLE8_rctXAJn9KHgZ0h_46cpK_6sdq62ZMe1lJj3I0ET0HQxZd1O9Rwc0LSzP25Pj-SAppvFPcGHy-tI_wQAAP__cHIVhQ">