2 ms·
This first seems like a pointless thing to do because you could just make it public in class A. But then when I think about it more I realize that it might actu
by robalni 4y ago
This first seems like a pointless thing to do because you could just make it public in class A. But then when I think about it more I realize that it might actually be pretty useful if you have a huge codebase and it would take 30 minutes to recompile if you change class A that is probably defined in a header file that is included everywhere. This trick can then save 30 minutes.
- zerr 4y agoThis is useful when class A is from system or 3rd party library header so you can't just change it (unless you want to maintain the patch).