GCC和MSVC接受以下片段,但Intellisense(EDG)抱怨:
class Base {
protected:
Base(Base const&) { }
};
class Derived : public Base {
// Error: protected function Base::base(const Base&) ... is not accessible
// through a "Base" pointer or object.
public:
Derived(Derived const& src) = default;
};
奇怪的是,接受了等效代码: Base(src) { }
。
Intellisense是否有权拒绝违约复制件?