Please, help with a weir error on templates.
Jose Roman Bilbao
jrbcast@dali.ace.ual.es
Wed Mar 17 15:34:00 GMT 2004
Hi all,
I am not a member of this list, therefore I will be grateful if you CC
me a copy of your responses.
I have the next problem with a source file:
When compiler reaches the next code:
template <>
void core_array_by_scalar< complex<double> >(const maTC &op1,
const complex<double> &op2, maTC &result, char operation) _THROW {
it complains with:
Src/MultidimBasic.inc:332: error: `double_complex' was not declared in
this scope
Src/MultidimBasic.inc:332: error: template argument 1 is invalid
Well, I have included:
#include <complex>
Some time ago it was compiled with complex.h and it did works. Now it
does if I change it back. The most strage thing (for me) is that this
part of code compiles well with <complex> in the same file:
bool operator == (const ma< complex<double> > &op1, const ma<
complex<double> > &op2) {
On the other hand, if I change <complex.h> to something similat to that
found on complex.h so:
#include <complex>
using std::complex;
typedef complex<float> float_complex;
typedef complex<double> double_complex;
typedef complex<long double> long_double_complex;
It does compile perfectly... I am puzzled. Can you explain me which is
the error please?.
Thank you very much,
Roman
More information about the Gcc-help
mailing list