5 ms·
Legit usage: #define private public #include "some old thing I need the internals of but can't change.h"
by gefh 10y ago
Legit usage:
#define private public
#include "some old thing I need the internals of but can't change.h"
- hairy_man674 10y agoC has no such keywords. Why the need for this hackery? Curious also if putting that in a header and including it in a C++ program even compiles without leading to undefined behaviour...
- to3m 10y agoThere's at least one compiler that adds visibility into the name mangling (is it gcc? Seems like the kind of thing they'd do), so if you unhide functions in this way you still won't necessarily be able to call them. (The compiler is also free to change the object layout when you do this, too, though I've no idea whether any of them do.)
- hairy_man674 10y ago> Seems like the kind of thing they'd do Forced to do by Microsoft C and C++ that mangle names.
- deleted 10y ago[deleted]