为什么私有CRTP基类必须被声明为朋友?

时间:2015-10-23 10:27:57

标签: c++ inheritance crtp

https://stackoverflow.com/a/365349/5455629

用户在这里说

// we derive privately, so the base-class wouldn't notice that, 
// (even though it's the base itself!), so we need a friend declaration
// to make the base a friend of us.

是否有相同的文档可用。我能找到它。感谢。

PS:我不能为这个答案添加评论,因为我是新来的,并且没有足够的声誉。

0 个答案:

没有答案