Re: confusion with Rogue Wave dcomplex.h

From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: 07/09/04


Date: Fri, 09 Jul 2004 21:26:49 GMT

Don Tucker wrote:
> I am receiving the following compile-time error:
>
> /opt/include/rw/dcomplex.h line 218 error(1420): argument list for
> class template "complex" is missing typedef complex DComplex
. ^^^^^^^^^^^^^^^^^^^^^^^^

>
> when compiling with a MIPSpro c++ compiler on an SGI platform. I see
> nothing about the header file that has been modified from its original
> state. Also, if the right precompiler conditions are met,
> /opt/include/rw/rcomplex.h is included, which has DComplex fleshed
> out.
>
> I don't even know where to begin in resolving this problem. Any help
> is appreciated.

It looks like the compiler when compiling 'dcomplex.h' knows about
'complex' template from 'std' namespace, but the file 'dcomplex.h'
is written to assume that "complex" is a class and not a template.

If you do

    #include <complex>
    using namespace std;
    typedef complex DComplex;

you will get the same error (probably) on any conforming compiler
because the use of 'complex' requires the template arguments here:

    typedef complex<double> DComplex;

I don't know how to resolve your problem, without seeing the Rouge
Wave headers and knowing how compiler gets there it's quite hard.

Do you really have to use Rogue Wave?

Victor



Relevant Pages

  • Re: templates and inheritance
    ... compiler uses to generate code. ... the implementation of the methods in a .cpp file. ... nothing of the template appears in the resulting .obj file unless ... put all of the implementation of your template class into the header file ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Why isnt this template being instantiated?
    ... > I had my template declairation in a header file: ... so the compiler never knew about the work ... > the template was doing until it was too late... ... You could do this special thing in your separate cpp file: ...
    (comp.lang.cpp)
  • Re: #include question
    ... >>The definition of a class or template tells the compiler what to do when ... After the compiler has created all the objects of a ... > By default a variable is defined (which includes declaration) unless it ... > A function is usually declared in a header file. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: [C++] Vector - guaranteed to be contiguous?
    ... >> member is templated on the input iterators as well. ... template<typename OUTITER, typename INITER, typename INITERT> ... What happens is that the compiler sees copy and thinks, "Hey, I know copy. ... But it is a template, let me try to deduce those types. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: generic programming is very powerful. c should support it
    ... Where the compiler matches the correct template. ... already happens differently on different implementations. ...
    (comp.lang.c)