I donβt know about Kuda, but I know that linking C ++ 98 and C ++ 11 object files is very dangerous, because template instances are allocated only once in the final executable. The fact is that ABI can change.
I ran into this problem with std::complex<double>::real() and g ++. One of the two instances returned a pointer to double , the other - double . The linker emitted only one of two instances (the one that immediately returned) to the final executable file, and the calling C ++ 98 code subsequently mistakenly accepted duplicates as pointers, which led to segfault.
For what it happened, just look at <complex> : Depending on the type __cplusplus >= 201103L or not, real() declared like this:
constexpr _Tp real();
or as follows:
const _Tp& real() const { return _M_real; }
I doubt there are more examples than just std::complex .
source share