Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
ethan_smith
· 1y ago · 0 comments
The #define private public hack doesn't work reliably in modern C++ compilers and violates the One Definition Rule, potentially causing undefined behavior and hard-to-debug errors.
Comments
[–]
CodeHz
1y ago
Actually, it won't compile in msvc (the linking phase, to be precise), MSVC uses different names for methods with different visibilities