I'm pursuing with a couple of compiler engineers, to see if this is supported. Didn't want you to think you were being ignored, but I don't have an answer yet. Apologies for the delay, I was out for a little bit.
I don't think I'm going to get a definitive answer. But I do same some information.
1: This looks like an unsupported use case within the static C++ extension
2: The recommendation is to avoid using this extension if possible, in general.
This is legacy code and not updated to cover changes in OpenCL (e.g. OpenCL 2.0 features). I'll make a personal prediction (just based on experience) that at some point it will be officially deprecated as the language changes further. To the best of my knowledge there are no official plans or roadmap to do so, but I've seen this kind of thing happen often.
For example, OpenCL 2.1 is coming. Per the Khronos site... will have "New C++ kernel language based on C++14 for significantly enhanced programmer productivity and performance portability with clean, re-usable code"
Well that sounds a bit like marketing to me, but just to make the point that the landscape is changing, and this extension is not.
Thank you a lot for this information. It doesn't really matter for me which extension to use, so if there will be a new one, I guess my C++ code will work with it anyway. Maybe I'm missing something, but for now static C++ extension is the only one working with C++?