<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57974>57974</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[C++4OpenCL] call to 'forward' is ambiguous when used inside lambda
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
biggysmith
</td>
</tr>
</table>
<pre>
Hi,
I'm getting a '[call](error: call to 'forward' is ambiguous)' when trying to compile a kernel that forwards variadic arguments
```
auto lambda = [](auto&&... arg) {
func2(forward<decltype(arg)>(arg)...);
};
lambda(dst_img,src_img);
```
godbolt example [here](https://godbolt.org/z/xvcqGzPnY)
It works in regular C++, but I think address spaces might be confusing it here in OpenCL.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNUsmO2zAM_Rr5QtRw5C0--DBJmnaAAu21p0K2GFuNvFRLMpmvL2Vn0sGcKtAyKZFPj0szyVv9VTG-Z8mBJU_r_sx4OUCHzqmxAwFksnzXCq1ZfmB8i8ZMhqVPEI7ATcHhNJmrMJI0UBbE0KjOT94yXoWja48jOHMLeOTfTsOsNBL0Gc2IhNELB3cICxdhlJCqBWE6P-Do7Ht2rEjuspjCE6CmByURTQ9ATFeW4YLxgiSO4wBFXICVuzUMaJ382HLyfOOe7iW22t1mDOFLAEs_P3SCWU7uCKw8PHR4rNVe-VCktO6XGih6b027agHhze9DLuveTbKZtAN8EcNMVaKMejS4ZtU7N1uqPeNHkrtrPAWCx1f6Xi7tny-vP8afS7bvm-rgOpmzBTWCwc5rYWDP-G6RPTTewTP1QY1nEFIatBbsLFq0MKiud9AgtW08eRt6qBwESgHr-4zj_lscYb0pimyT8U25jWSdyiqtROSU01hTBvenstWdcvmP4VnHxluU9JBVEu99jrzR9YdCKNf7JqbBIkPry9vv02ym39g6MpW1Hmkgj3lZlVnU12kq5VY2VZmcEslbLkVZbFAkPN9gJdMk0qJBbQN7xvmIV1ggSCf6kap5wnlS8ZxT0vk2Pm2ztDgVWZpmssryjGUJDkLpOPAIHYpMvVBqfGfpUivr7L9LYa3qRlyKFfBpfPvJ1FSK7mYHSi9aXq8X9n8BgXUgGg">