8 ms·
> Or just integrate with C++ code by exposing it through C linkage with `extern "C" {}`. Nope. Been there. Done that. Got the scars. For example, what happ
by bsder 5y ago
> Or just integrate with C++ code by exposing it through C linkage with `extern "C" {}`.
Nope. Been there. Done that. Got the scars.
For example, what happens when an exception gets thrown on the other side of that "extern C"? Yeah, undefined.
The problem is that if you're using C++, you get the C++ machinery--allocators, exceptions, etc.--and you can't dodge it.
- pjmlp 5y agoExcept that libc you are using, most likely was implemented in C++ with extern "C", unless using a pre-historic C compiler.