Nice. That is the best solution.

I’ll point out that there are other solutions here, mostly involving modifications to the OpenVDB source code:

  1. Compile with a lower optimization level, which may or may not help. This also has the downside that things will run slower.
  2. Split the offending source file into two or more smaller files.
  3. Move more implementation out of the header files and into the C++ files. This can make each compilation unit use slightly less memory.
  4. Reduce the amount of templating in the header files. This is the hardest to do, but also will probably (along with 2) have the most benefit.