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: Jeffrey Oldham
Subject: Re: [pooma-dev] RFA: DomainIterator.h: Add DomainTraits Specializ ation
Date: Thu, 24 May 2001 19:31:13 -0700
User-agent: Mutt/1.2.5i

On Thu, May 24, 2001 at 09:48:07AM -0700, James Crotinger wrote:
> 
> 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.)

No, this does not solve the problem.

James Crotinger writes:
> Jeffrey D. Oldham writes:
> > Do you know of a way to have a compiler list all
> > the templates it is instantiating?
> 
> No, but one of the features I really like about KCC is that when it gets an
> error while instantiating a template it gives you a full list of what it was
> instantiating when the error occurred, which is usually sufficient to figure
> these things out. It would be nice for GCC to do something similar instead
> of just giving the line number of the error.

KCC does not produce any more information than gcc 3.0 does.

My experiment below is as precise to the source of the problem as I
know how to do.  It seems Domain/NewDomain.h includes some code which
causes a ripple of template instantiations that cause the difficulty.

We do need to ensure that all the Pooma code compiles.  Will you
please solve the problem?  My proposed solution is attached.

Thanks,
Jeffrey D. Oldham
address@hidden

> > -----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???

Attachment: NewDomain.h.patch
Description: Text document


reply via email to

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