[prev in list] [next in list] [prev in thread] [next in thread]
List: quanta-devel
Subject: [quanta-devel] OT [was Re: forward declarations]
From: Frans Englich <frans.englich () telia ! com>
Date: 2005-07-29 11:52:02
Message-ID: 200507291201.29805.frans.englich () telia ! com
[Download RAW message or body]
On Friday 29 July 2005 05:42, Andras Mantia wrote:
> On Thursday 28 July 2005 23:11, Frans Englich wrote:
> > On Thursday 28 July 2005 19:56, Andras Mantia wrote:
> > > On Thursday 28 July 2005 22:14, Linus McCabe wrote:
> > > > I know in the quanta code forward declarations are prefered to
> > > > including headers.
> > > >
> > > > However, is there an alternative to include a header if you have
> > > > a method with an enum as an argument?
> > > >
> > > > From what i understand you cannot forward declare enums?
> > >
> > > Don't know right now how to do it, so just include the header.
> >
> > I've neither found a solution for that. The reason, as far as I know,
> > is that forward declarations wasn't designed to speed up compiles,
> > but to solve cyclic dependencies.
> >
> > Another case where forward declaration doesn't work(AFAIK) is for
> > typedefs, such as "typedef QValueList<MyClass *> List;"
>
> Yes, and for templates as well AFAIK. (QValueList, QDict, QMap and so).
We're surely getting off-topic :) but I do this with templates:
template <typename C> class QDict;
Cheers,
Frans
_______________________________________________
quanta-devel mailing list
quanta-devel@kde.org
https://mail.kde.org/mailman/listinfo/quanta-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic