Thanks to your other question it looks like this pattern is now known as the “passkey” pattern.
In C++11, it gets even cleaner, because instead of calling
b.protectedMethod(SomeKey());
you can just call:
b.protectedMethod({});
Thanks to your other question it looks like this pattern is now known as the “passkey” pattern.
In C++11, it gets even cleaner, because instead of calling
b.protectedMethod(SomeKey());
you can just call:
b.protectedMethod({});