vendredi 18 avril 2014

c ++ - C2886 class/struct typedef class héritage libre utilisant - Stack Overflow


struct Foo
{
typedef Foo FooInner;
};

struct Bar:Foo
{
using Foo::FooInner; // <-
};

// compiler: VS Express 2013 Update 1 - Compile Error C2886


// compiler: GCC 4.7.2 - Success


// Is it wrong?



struct Foo
{
typedef Foo FooInner;
};

struct Bar:Foo
{
using Foo::FooInner; // <-
};

// compiler: VS Express 2013 Update 1 - Compile Error C2886


// compiler: GCC 4.7.2 - Success


// Is it wrong?


0 commentaires:

Enregistrer un commentaire