Better Friendship : Passkey Idiom
Often when declaring a class as a friend, we give it more freedom than it actually needs i.e. it has access to all the private members, which in quite a few cases is not ideal. The Passkey Idiom is one way to mitigate this. Consider the following class: class Symbol...
Aug 2018 — 3 minute read