Hi all!
I've read forward declaration is much prefered than include in header files mainly because it reduces the compilation time. Other reasons?
My particular situation is that all header files that I use are within a namespace. I've seen two different ways for forward declaration in this case:
namespace n1
{
class c1;
}
and
using namespace n1;
class c1;
I think the first one is better because I don't like the idea of the "using" keyword in a .h file. But with this method 1 line of include is converted into 4 lines for each include
Since I use 5 or more includes of 5 different namespaces the code increases quite a lot.
My question is...
Is there any other way of using this forward declaration but with that increment in source code lines?
any idea?
thank you all in advance!