[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta-devel
Subject:    Re: [quanta-devel] forward declarations
From:       Andras Mantia <amantia () kde ! org>
Date:       2005-07-29 5:42:21
Message-ID: 200507290842.27827.amantia () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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).

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org

[Attachment #5 (application/pgp-signature)]

_______________________________________________
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