Forward reference to class in external namespace

When declaring a forward reference to a class in external namespaces I've found that the following syntax works as desired:

1
2
3
4
namespace A {
namespace B {
class C;
}}

This is a bit awkward, but the syntax -

 
class A::B::C;

- is rejected.

Is there an acceptable, and succinct, alternative syntax for this case?
> Is there an acceptable, and succinct, alternative syntax for this case?

AFAIK, no.

Last edited on
A translation unit has to know how the names A and B were declared. That is it has to know what entities are denoted by A and B.
Topic archived. No new replies allowed.