<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/154019>154019</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [OpenCL4Cpp] Templates and address spaces
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          piotrrak
      </td>
    </tr>
</table>

<pre>
    Please consider this code (from my attempt on compiling libc++ in OpenCL C++ dialect)

https://godbolt.org/z/EYGs97zKs

It is hard for me to imagine what `__generic char` type even is.

I am looking for confirmation that types shouldn't propagate address space in such cases unless those are pointers/references,
and I should consider it bug.

Should such idiomatic code C++ should compile (please disregard `__constant` case which is separate issue) or it is just how it was specified?

Still wrapping my head around address space rules, help with understanding the correct behavior would be really appreciated.

For function types the it wording is pretty clear, thus #153508 and #153459 which I consider a progress in right direction.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxclEGP2zYQhX8NfRnEkCnJXh102N3UxaIFWqC99BSMyLE4CUUS5GgN59cXlJ0umpNAUfP45n0cYSk8B6JR9S-q_7zDVVzMY-IoOeO33RTtbfzTExYCE0NhSxnEcQETLYHST5ccF1hugCK0JIEYwMQlsecwg-fJKP2i9AtwgD8Shdff4fXxxjJ6MqL0oJpn1Tw7kVRU-6z0WenzHO0UvexjnpU-f1f6_Ms_v5bh9P23cv_8TYALOMwWLjHDQiAReMGZA8HVoYA6Nl--zBQoswHjMKtjA3JLBPROAbjsH0qAC_gYv1XLVcvEcOG8oHAMIFWqVhUoLq7eBqVPAinHhDMKAVqbqRQoCQ3VPstqHBgsVGANvm6Ji4UAM0GKHIRyUfqc6UKZgqGi9KtqnjFYeHuc8RE2C0zr_HD6131zO4Atx2rR3FH8SPW_-spgI5Tu-CyXTHONa8ulHiAYpGZSvcLVcVUtUChhro1xKSspPUDcbHCBr2sRcPFal1esLZPhC5NV7fnhUNh7uGZMqaa53MARWsAc12B_iiqvfusdHPkEVxYHa7CUqy9bq8XVW5czGYGJHL5zzHDd-psIMqH3N8CUMhlGIftI6RwzXNZg7vg2clWpeo55E-YCKZPIDYwnzNWDuLWA0u2hb_vmCSqM-6rrh0c2bx9UsPKft144QObZCViuRjmG_c6OrR3aAXc0Hk5937VD0-idG_XQ2tachsOEx456bE496uZ4QXpqqLGXHY-60X3zdDgd2v7Y6f106bGb2mM3TaY9TkfVNbQg-73370sdjt1GaTz0XXMYdh4n8mWbZq0DXX8w1HW481iLPk3rXFTXeC5SPmSExW-_gfuUdq8pqf4z_E1L8ihUtkT-x6_s1uzHn6aWxa3T3sRF6XPVfjw-pRy_bsN-3hzV-_-w_D7qfwMAAP__ItmGgw">