[pooma-dev] Metrowerks and template member functions
John Hall
johnharveyhall at qwest.net
Fri Apr 20 16:44:20 UTC 2001
Sorry guys. Here are the diffs to get these three files coompiling
under metrowerks 6.1.
John
cvs -z9 diff Interval.h (in directory Macintosh HD:Programming:TCode
:Blanca:r2:src:Domain:)
Index: Interval.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Domain/Interval.h,v
retrieving revision 1.17
diff -r1.17 Interval.h
385c385,389
< Interval(const T1 &m, const T2 &n);
---
> Interval(const T1 &m, const T2 &n)
> : Domain<1, DomainTraits<Interval<1> > >(Pooma::NoInit() ) {
> DomainTraits<Interval<1> >::setDomain(domain_m, m, n);
> }
>
390c394,398
< Interval(const T1 &m, const T2 &n, const T3 &s);
---
> Interval(const T1 &m, const T2 &n, const T3 &s)
> : Domain<1, DomainTraits<Interval<1> > >(Pooma::NoInit()) {
> PAssert(s == 1);
> DomainTraits<Interval<1> >::setDomain(domain_m, m, n);
> }
416,434d423
<
< // initialize from a set of endpoints: sets interval to [m ..n]. Must
< // have m <= n.
< template <class T1, class T2>
< inline
< Interval<1>::Interval(const T1 &m, const T2 &n)
< : Domain<1, DomainTraits<Interval<1> > >(Pooma::NoInit()) {
< DomainTraits<Interval<1> >::setDomain(domain_m, m, n);
< }
<
< // initialize from three integers: if the stride is not 1,
< // it is an error.
< template <class T1, class T2, class T3>
< inline
< Interval<1>::Interval(const T1 &m, const T2 &n, const T3 &s)
< : Domain<1, DomainTraits<Interval<1> > >(Pooma::NoInit()) {
< PAssert(s == 1);
< DomainTraits<Interval<1> >::setDomain(domain_m, m, n);
< }
*****CVS exited normally with code 1*****
cvs -z9 diff Range.h (in directory Macintosh HD:Programming:TCode
:Blanca:r2:src:Domain:)
Index: Range.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Domain/Range.h,v
retrieving revision 1.18
diff -r1.18 Range.h
415c415,418
< Range(const T1 &m, const T2 &n);
---
> Range(const T1 &m, const T2 &n)
> : Domain<1, DomainTraits<Range<1> > >(Pooma::NoInit()) {
> DomainTraits<Range<1> >::setDomain(domain_m, m, n);
> }
420c423,426
< Range(const T1 &m, const T2 &n, const T3 &s);
---
> Range(const T1 &m, const T2 &n, const T3 &s)
> : Domain<1, DomainTraits<Range<1> > >(Pooma::NoInit()) {
> DomainTraits<Range<1> >::setDomain(domain_m, m, n, s);
> }
446,464d451
<
< // initialize from a set of endpoints: sets range to [m ..n].
< // domain_m is the domain information storage kept in the base class.
< template <class T1, class T2>
< inline
< Range<1>::Range(const T1 &m, const T2 &n)
< : Domain<1, DomainTraits<Range<1> > >(Pooma::NoInit()) {
< DomainTraits<Range<1> >::setDomain(domain_m, m, n);
< }
<
< // initialize from a set of endpoints and with a given stride.
< // domain_m is the domain information storage kept in the base class.
< template <class T1, class T2, class T3>
< inline
< Range<1>::Range(const T1 &m, const T2 &n, const T3 &s)
< : Domain<1, DomainTraits<Range<1> > >(Pooma::NoInit()) {
< DomainTraits<Range<1> >::setDomain(domain_m, m, n, s);
< }
<
*****CVS exited normally with code 1*****
cvs -z9 diff Grid.h (in directory Macintosh HD:Programming:TCode
:Blanca:r2:src:Domain:)
Index: Grid.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Domain/Grid.h,v
retrieving revision 1.11
diff -r1.11 Grid.h
412c412,414
< Grid(const T1 &m, const T2 &n);
---
> Grid(const T1 &m, const T2 &n) {
> DomainTraits<Grid<1> >::setDomain(domain_m, m, n);
> }
417c419,421
< Grid(const T1 &m, const T2 &n, const T3 &s);
---
> Grid(const T1 &m, const T2 &n, const T3 &s) {
> DomainTraits<Grid<1> >::setDomain(domain_m, m, n, s);
> }
471,487d474
<
< // initialize from a set of endpoints: sets range to [m ..n].
< // domain_m is the domain information storage kept in the base class.
< template <class T1, class T2>
< inline
< Grid<1>::Grid(const T1 &m, const T2 &n) {
< DomainTraits<Grid<1> >::setDomain(domain_m, m, n);
< }
<
< // initialize from a set of endpoints and with a given stride.
< // domain_m is the domain information storage kept in the base class.
< template <class T1, class T2, class T3>
< inline
< Grid<1>::Grid(const T1 &m, const T2 &n, const T3 &s) {
< DomainTraits<Grid<1> >::setDomain(domain_m, m, n, s);
< }
<
*****CVS exited normally with code 1*****
>John,
>
>Is it possible for you to send diff's of these files?
>Just glancing at them, I can't tell what has been changed.
>
>Thanks, Julian C.
>
>
>
>
>
>---------- Original Message ----------------------------------
>From: John Hall <johnharveyhall at qwest.net>
>Date: Thu, 19 Apr 2001 23:22:31 -0600
>
> >Pooma gang:
> >Apparently, Metrowerks has a problem with template member functions
> >of partially specialized classes inheriting from a partially
> >specialized base class being defined external to the class
> >declaration. As a result, some code checked in last week caused
> >Interval.h, Range.h and Grid.h to stop compiling. Here are versions
> >that compile under Metrowerks and should be identical in
> >functionality.
> >
> >Could someone look these over and if they are OK check them in?
> >John Hall
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 6279 bytes
Desc: not available
URL: <http://sourcerytools.com/pipermail/pooma-dev/attachments/20010420/8228254a/attachment.bin>
More information about the pooma-dev
mailing list