by beatbrokedown · 9y ago · 0 comments
namespace {
void NeverCalled() { Do = EraseAll; }
}
or marking NeverCalled as static itself.Results in warning: unused function NeverCalled.
In general this is best practice for functions defined and used in a single translation unit.
You could hypothetically link this compilation unit against another unit which included:
void NeverCalled();
struct A {
A() { NeverCalled(); }
};
A a;