pitrou commented on PR #45618:
URL: https://github.com/apache/arrow/pull/45618#issuecomment-2769144347

   > I've tried a couple of things but I can't seem to make it work adding the 
static initializer on the code file instead of the header.
   
   This all seems very complicated to me. You should only need something like:
   ```c++
   namespace {
   
   bool RegisterComputeKernels() {
     auto registry = GetFunctionRegistry();
   
     internal::RegisterScalarArithmetic(registry);
     // etc.
     return true;  // dummy return value, must return something
   }
   
   bool g_kernels_registered = RegisterComputeKernels();
   
   }
   ```
   
   (various spellings of this are possible, but the semantics would be the same)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to