You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These were introduced in commit 4e469e0 (Allow overriding selected
operator new and delete functions) with the intention to make the
Arduino-provided definitions weak and allow them to be replaced by
sketch-provided or library-provided versions.
However, the attributes were placed in the `<new>` header file, causing
*all* implementations (that `#include <new>`) to become weak (including
sketch or library versions), which is not the intention.
This commit fixes this by moving the weak attributes into the cpp file,
causing only the Arduino-provided implementations to become weak.
Note that in practice, the linking order (or maybe the use of an archive
file for linking the core) seems to ensure that the sketch-provided
versions are preferred over the the Arduino-provided versions, so even
without this commit these operators can be replaced by the sketch.
0 commit comments