On Fri, 28 Feb 2014, Paul Smith wrote:
The simplest is probably to use asm("other_name_for_new") on a
declaration of new, so it is still visible but with a different
name...
But isn't this subject to the same caveats that using force_inline is?
You mean always_inline? Well, it has the advantage that it doesn't force
the function to be inlined ;-)
If I don't include the header file, then the code silently falls back to
the system new/delete.
It shouldn't be hard to check if nm -D yourlib.so contains _Znwm as U, you
can add that to the Makefile. Well, if you control the Makefile, you can
actually add -include mynew on the command line so it can't be
forgotten...
--
Marc Glisse