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

James Crotinger JimC at proximation.com
Thu May 24 16:48:07 UTC 2001


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:oldham at codesourcery.com]
> Sent: Thursday, May 24, 2001 10:09 AM
> To: JimC at proximation.com
> Cc: pooma-dev at pooma.codesourcery.com
> 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  <oldham at codesourcery.com>
> 
>         * 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
> oldham at codesourcery.com
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/pooma-dev/attachments/20010524/520c9c08/attachment.html>


More information about the pooma-dev mailing list