どうやらこのキー指向のアクセス保護パターン:
class SomeKey {
friend class Foo;
SomeKey() {}
// possibly non-copyable too
};
class Bar {
public:
void protectedMethod(SomeKey); // only friends of SomeKey have access
};
... はまだ名前が知られていないので、舌を折らずに参照できるように、適切な名前を見つけたいと思います。提案?
そのはず:
- 簡潔
- アクセス保護の意図を伝える
- 理想的には、プロキシが不要であることを意味します (?)