Re: BZDEV: Metrowerks CodeWarrior Pro 4

From: Matthias Troyer (troyer@itp.phys.ethz.ch)
Date: Fri Oct 23 1998 - 03:09:05 EST


Michael Toksvig wrote:
>
> Hi Todd,
>
> Just to let you know that Metrowerks has released version 4 or their
> Mac/win/Unix/Playstation/Whatnot compiler, CodeWarrior Pro, and that it, as
> far as I can see, supports everything needed to compile Blitz++ 0.4.2 EXCEPT
> declaration of member templates outside the class. How annoying... I have
> included a config.h file.
>
> Any change of a version where all the member templates are declared inside
> the class? CodeWarrior will actually only generate inline code if the inline
> keyword is explicitly add, so code-bloat shouldn't be an issue.
>
> Michael Toksvig
> Abraxas International
>
>

I have tried to to exactly that using the final beta version of
CodeWarrior 4 and succeeded only partially. The main problem appears
to be a bug in the handling of template member types as default template
parameters in codes like this:

template<class P_numtype>
class NumericTypeTraits {
public:
typedef P_numtype T_sumtype;
};

template<class P_sourcetype, class P_resulttype = typename NumericTypeTraits<P_sourcetype>::T_sumtype>
class ReduceSum;

//OK:
template<class T_numtype>
ReduceSum<T_numtype, typename NumericTypeTraits<T_numtype>::T_sumtype> sum();

//produces compile time error:
template<class T_numtype>
ReduceSum<T_numtype> sum();

Matthias Troyer
--------------------- blitz-dev list --------------------------------
* To subscribe/unsubscribe: mail to majordomo@oonumerics.org, with
"subscribe blitz-dev" or "unsubscribe blitz-dev" in the body of the message
* Blitz++ web page: http://oonumerics.org/blitz/



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 04:30:07 EST