Unblock RWC by extending the static call operator workaround by StephanTLavavej · Pull Request #5312 · microsoft/STL (original) (raw)

Fixes internal VSO-2397560 "[RWC][prod/fe][Regression] Taichi build failed with error G444FFF0D: overloaded 'operator()' cannot be a static member function".

We build https://github.com/taichi-dev/taichi in our Real World Code test suite. They're using an older version of Clang/LLVM than we require (I believe it's Clang 14 🙀, when we now require Clang 19), and they've been defining our escape hatch macro to get away with this, but #5284's change to use C++23 WG21-P1169R4 static operator() downlevel has broken them.

We need to work around CUDA 12.4's lack of support for static call operators, so we may as well extend this to ancient versions of Clang, but we are not attempting to support paleolithic compilers in general. In the future, when we can upgrade our minimum supported CUDA version to something that understands static call operators, we should entirely remove this workaround - if Taichi hasn't upgraded their Clang dependency by then, we'll have to file an issue and temporarily skip it in RWC.