Is this key-oriented access-protection pattern a known idiom?

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({});

Leave a Comment