freepooma-devel
[Top][All Lists]
Advanced

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

Re: [pooma-dev] Expanding Supported Explicit Instantiations


From: Jeffrey Oldham
Subject: Re: [pooma-dev] Expanding Supported Explicit Instantiations
Date: Tue, 22 May 2001 12:14:05 -0700
User-agent: Mutt/1.2.5i

On Tue, May 22, 2001 at 01:04:34PM -0600, Dave Nystrom wrote:
> Jeffrey Oldham writes:
>  > OK to commit this patch?
>  > 
>  > Dave Nystrom desired to explicitly instantiate this program:
>  > 
>  >     #include "Pooma/NewFields.h"
>  > 
>  >     #define T1 NoGeometry<(int)3>
>  >     #define T2 int
>  >     #define T3 CompressibleBrick
>  >     #define T4 Interval<(int)3>
>  >     template View1<Field<T1,T2,T3>,T4>::sv;
>  > 
>  > I do not know the correct syntax for explicitly instantiating View1's
>  > const static bool `sv' if this is even legal.  The attached patch
>  > permits instantiating
> 
> I first interacted with Arch Robison at KAI about this instantiation problem
> and he did not comment that the syntax was wrong.  Also, the KCC prelinker
> only instantiates the const static bool 'sv', not anything else.

I was using gcc 3.0, not KCC.  My comment about the correct syntax
follows from Stroustrup's Appendix C.13.10 of \emph{The C++
Programming Language}, Special Edition.  If I remember correctly, gcc
3.0 supports your original syntax, but it seems better to me to follow
the rules Stroustrup advises.

> I'm also curious whether Jim Crotinger's idea of making 'sv' private in the
> hope that the compiler could optimize it away was worth considering.

I think this is probably the right thing to do, but I defer to him or
you to make that change.

****************

Ignoring the syntax issue, does the patch permit you to do what you
want?

Thanks,
Jeffrey D. Oldham
address@hidden

reply via email to

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