struct Foo
{
typedef Foo FooInner;
};
struct Bar:Foo
{
using Foo::FooInner; // <-
};
// compiler:VS Express 2013 Update 1 - 编译错误C2886
//编译器:GCC 4.7.2 - 成功
//是不是错了?
答案 0 :(得分:0)
从MSDN Article来看,VS 2013是错误的。
“'class :: identifier':符号不能在成员using-declaration中使用 using声明使用符号,例如命名空间名称。 using声明用于声明基类成员。“