Blitz logo

Blitz Support :

From: Andrius Kurtinaitis (andrius.kurtinaitis_at_[hidden])
Date: 2003-12-15 02:12:45


Julian,
thanks for the explanation. Unfortunately it did not work.
The only place in that simplistic example where i thought i can use
typename, is this: BZ_DECLARE_FUNCTOR2( typename Mean )
The compiler gives in this case some errors instead of the previous
warnings...
Andrius

Julian C. Cummings wrote:
> Andrius,
>
> The warning means that you should have used the "typename" keyword to
> indicate that the expression that follows is a type. You need to use
> "typename" whenever you are within some templated code and you are
> extracting a template-dependent type using the :: operator.
>
> Regards, Julian C.

cd /home/andrius/download/ternary/
g++ -o testTernary testTernary.cpp /usr/lib/libblitz.a
testTernary.cpp:7: error: syntax error before `,' token
testTernary.cpp:8: error: syntax error before `}' token
testTernary.cpp: In function `int main(int, char**)':
testTernary.cpp:17: error: no match for call to `(Mean) (blitz::Array<double,
   1>&, blitz::Array<double, 1>&)'
testTernary.cpp:6: error: candidates are: double Mean::operator()(double,
   double)

Compilation exited abnormally with code 1 at Mon Dec 15 09:12:20