freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [pooma-dev] RFA: DomainIterator.h: Add DomainTraits Specializ ation


From: James Crotinger
Subject: RE: [pooma-dev] RFA: DomainIterator.h: Add DomainTraits Specializ ation
Date: Thu, 24 May 2001 09:48:07 -0700


Actually, will the problem be fixed if you include DomainTraits.h and DomainTraits.int.h in Array.h and NewField/Field.h? These look like the culprits - they define these ViewN structs, which make use of the DomainTraits template, but the DomainTraits template and its specializations are never included. Further, these are used to implement the generic operator(), which is the main place where we need to detect if someone is passing an int as an argument.

(The general DomainTraits template is always included implicitly by the client who uses a particular Domain, but the int specialization is not - I don't know why this works with other compilers.)

  Jim


> -----Original Message-----
> From: Jeffrey Oldham [mailto:address@hidden]
> Sent: Thursday, May 24, 2001 10:09 AM
> To: address@hidden
> Cc: address@hidden
> Subject: Re: [pooma-dev] RFA: DomainIterator.h: Add DomainTraits
> Specialization
>
>
> On Wed, May 23, 2001 at 03:28:34PM -0700, James Crotinger wrote:
> > I don't think that's it either - the question is, who is
> directly causing
> > DomainIterator<int> to be instantiated?
>
> I do not know.  Starting with
> CoordinateSystems/tests/CartesianTest1.cpp with an empty main(), I
> repeatedly replaced header files while the problem continued to exist
> until I ended with
>
>     #include "Domain/NewDomain.h"     // problem in here?
>     #include "Domain/DomainTraits.int.h"
>
>     int main()
>     {
>     }
>
> Replacing the first line with the header files it includes makes the
> problem disappear.  Thus, I conclude that the use is in
> Domain/NewDomain.h, not in files it includes.  Every use of
> DomainTraits<...> uses a template parameter so I do not know what is
> being instantiated.  Do you know of a way to have a compiler list all
> the templates it is instantiating?
>
> ****************
>
> How about this?  OK to commit?
>
> When trying to compile src/CoordinateSystems/tests/CartesianTest1.cpp,
> gcc 3.0 complained that a DomainTraits specialization was declared
> after the general DomainTraits.  This patch resolve the problem.
>
> 2001 May 23  Jeffrey D. Oldham  <address@hidden>
>
>         * NewDomain.h: Add DomainTraits.int.h inclusion.
>
> Tested on       sequential Linux using gcc 3.0 by compiling
> CartesianTest1.cpp
> Approved by     ???you???
>
> Thanks,
> Jeffrey D. Oldham
> address@hidden
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]