lundi 29 septembre 2014

How to forward declare templated type that should belong to a class?


Vote count:

0




Assume I have 2 classes:



class A
{
public:
typedef std::shared_ptr<A> Ref;
...

private:
B::Ref _b;
}

class B
{
public:
typedef std::shared_ptr<B> Ref;
...

private:
A::Ref _a;
}


This obviously requires forward declaration of class B and B::Ref. Forward declaring B is simple, but how to do that for B::Ref too?



asked 1 min ago







How to forward declare templated type that should belong to a class?

Aucun commentaire:

Enregistrer un commentaire