J
Jorge Yáñez
Hello,
It's possible to do a forward declaration of a typedef?
Something similar to
typedef TMyType; // typedef forward
declaration
void f ( TMyType& t )
{
// do something with t
}
...
typedef double TMyType; // typedef declaration
The code above doesn't compile.
In Item 37 of "More Exceptional C++", Herb Sutter says that is not
possible to do a forward declaration of std:stream ( that is a typedef )
because it's part of the std namespace. Does this means that typedef forward
declarations for non-std members are possible?
Thanks.
It's possible to do a forward declaration of a typedef?
Something similar to
typedef TMyType; // typedef forward
declaration
void f ( TMyType& t )
{
// do something with t
}
...
typedef double TMyType; // typedef declaration
The code above doesn't compile.
In Item 37 of "More Exceptional C++", Herb Sutter says that is not
possible to do a forward declaration of std:stream ( that is a typedef )
because it's part of the std namespace. Does this means that typedef forward
declarations for non-std members are possible?
Thanks.