News for hackers. Stuff that matters.
Re:Public/protected/private is an unnecessary feature by ethan_smith on Thursday June 19, 2025 @10:17PM (#44324178)
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.
Re:Public/protected/private is an unnecessary feature by CodeHz on Friday June 20, 2025 @12:46AM (#44324813)
Actually, it won't compile in msvc (the linking phase, to be precise), MSVC uses different names for methods with different visibilities