Open Fletterio opened 2 months ago
I think this will somewhat work out of the box in Clang's HLSL implementation (see: https://godbolt.org/z/5df61eabK), but it will be really gnarly to fix in DXC because of DXC's custom overload resolution not handling C++ operators and templates correctly.
I'm marking this as a HLSL 202y feature because it is likely something we'll intentionally support in Clang but not in DXC and DXC will not support HLSL 202y.
With HLSL2021, we got both templated functions and templated struct methods. However, I am unable to template operator overloads, which is something I expected I would be able to do.
I would like to be able to do stuff like showcased in the Godbolt above.