I'm pretty clueless here, but just some 2c. How well is this handled in other non-C++ langs or tools which do have interop with C++?
Some examples that come to mind: D lang, Python with pybind11, and SWIG. And a couple of other usual things - providing a C extern function from C++ that somehow gets the job done, or using the Nim "emit" statement at strategic places to get needed C++ interop code. Or reversing things - write the app mainly in C++, but take advantage of Nim lang as far as possible (eg, CPP codegen from Nim (or direct .so/dll files), which then gets pulled into the C++ compilation, but only where that works, and use native C++ for the rest - eg I'm reminded about how Chucklefish uses Rust for most of their code for Spellbound, but then uses console-specific code like C++ to call into the Rust logic). It sounds like none of these would work (based on comments in this thread), but I'm mainly curious about why none of these are feasible
