Hi Ron,
> CW Linux uses GCC which really is crappy when it compares to MWCC
> (metrowerks C compiler). One of the EDG compilers should catch this too. I
> could get you a copy of Windows CodeWarrior would that help you, or are you
> strictly Linux?
Debugging blitz template issues is annoying enough without having
use windows too :-)
Let me take a closer look at your example. When I try to compile it under gcc:
> #include <blitz/array.h>
>
> using namespace blitz;
>
> extern const ETBase<_bz_ArrayExpr<_bz_ArrayExprConstant<double> > > expr;
>
> int main()
> {
> static_cast<_bz_ArrayExpr<_bz_ArrayExprConstant<double> > > (expr);
> }
It fails with:
g++ -I./.. -ftemplate-depth-30 -g -DBZ_DEBUG -c ./mwron.cpp
../blitz/array/expr.h: In method
`blitz::_bz_ArrayExpr<P_expr>::_bz_ArrayExpr (const T &) [with T =
blitz::ETBase<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<double>
> >, P_expr = blitz::_bz_ArrayExprConstant<double>]':
./mwron.cpp:10: instantiated from here
../blitz/array/expr.h:127: no matching function for call to
`blitz::_bz_ArrayExprConstant<double>::_bz_ArrayExprConstant (const
blitz::ETBase<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<double>
> > &)'
../blitz/array/expr.h:627: candidates are:
blitz::_bz_ArrayExprConstant<P_numtype>::_bz_ArrayExprConstant (const
blitz::_bz_ArrayExprConstant<P_numtype> &) [with P_numtype = double]
../blitz/array/expr.h:631:
blitz::_bz_ArrayExprConstant<P_numtype>::_bz_ArrayExprConstant
(P_numtype) [with P_numtype = double]
../blitz/array/expr.h:712:
blitz::_bz_ArrayExprConstant<P_numtype>::_bz_ArrayExprConstant () [with
P_numtype = double]
make: *** [mwron.o] Error 1
Which is similar to MW's error messages.
However the blitz testsuite etc. compile just fine under gcc.
I think your engineer might have made a mistake in distilling
the problem down, since blitz does not rely on code like
the above compiling.
Since gcc and edg compile blitz, I'm still inclined to think that the
problem is in MW. Sorry about that.
Cheers,
Todd
MW Ron wrote:
>
> Hi Todd,
>
> > I can't use this example to track down where in Blitz++ such a conversion
> > is attempted. If you send me a codewarrior linux license I can see
> > what's happening firsthand.
>
> CW Linux uses GCC which really is crappy when it compares to MWCC
> (metrowerks C compiler). One of the EDG compilers should catch this too. I
> could get you a copy of Windows CodeWarrior would that help you, or are you
> strictly Linux?
>
> Ron
>
>
> > #include <blitz/array.h>
> >
> > using namespace blitz;
> >
> > extern const ETBase<_bz_ArrayExpr<_bz_ArrayExprConstant<double> > > expr;
> >
> > int main()
> > {
> >
> > static_cast<_bz_ArrayExpr<_bz_ArrayExprConstant<double> > > (expr);
> >
> > }
> > =>
> >
> > Error : function call '_bz_ArrayExprConstant(const
> > blitz::ETBase<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<double>>>)'
> > does not match
> > 'blitz::_bz_ArrayExprConstant<double>::_bz_ArrayExprConstant(const
> > blitz::_bz_ArrayExprConstant<double> &)'
> > 'blitz::_bz_ArrayExprConstant<double>::_bz_ArrayExprConstant(double)'
> > 'blitz::_bz_ArrayExprConstant<double>::_bz_ArrayExprConstant()'
> > (instantiating:
> > 'blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<double>>::_bz_ArrayExpr<b
> > litz::ETBase<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<double>>>>(co
> > nst
> > blitz::ETBase<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<double>>>
> > &)')
> > expr.h line 121 : iter_(a)
> > =======
> >
> > CW6 picks the _bz_ArrayExpr template constructor
> >
> > template<class T>
> > _bz_ArrayExpr(const T& a)
> > : iter_(a)
> > { }
> >
> > to convert the "ETBase<_bz_ArrayExpr<_bz_ArrayExprConstant<double> > >" to
> > "_bz_ArrayExpr<_bz_ArrayExprConstant<double> >", but the
> > "blitz::ETBase<blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant<double>>>"
> > ctor initializer argument for the iter_ doesn't mach any of the
> > blitz::_bz_ArrayExprConstant<double> constructor functions.
>
>
>
>
> --
> "GEEKWARE IS BACK"
>
> http://www.metrowerksstore.com/geekware.html
>
> Metrowerks "Software Starts Here" MWRon@metrowerks.com
>
>
>
-- Todd Veldhuizen tveldhui@acm.org Indiana Univ. Comp. Sci. http://extreme.indiana.edu/~tveldhui/--------------------- blitz-dev list -------------------------------- * To subscribe/unsubscribe: use the handy web form at http://oonumerics.org/blitz/lists.html
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 04:30:12 EST