Topic: MSVC 5.0 <vector>/<complex> error


Author: "Mark Sebern" <msebern@nospam.sebern.com>
Date: 1998/01/19
Raw View
For what it's worth, another problem with the MSVC 5.0 STL, complex
template, and/or compiler. This program fails to compile:

// complextest.cpp

#include <complex>
#include <vector>

using namespace std;

void main ()
{
  vector < complex<double> > vec;
}

The problem appears to be related to a template specialization for
complex<double> that makes the compiler unable to handle a template
parameter ("_Ty") which results in a message that it can't find a
destructor for type "_Ty".

It is possible that both the vector template and the complex template use
"_Ty" for different uses. I assume the C++ standard allows this, and that
the problem in the compiler, but I'm not enough of an expert to know.

-- Mark Sebern
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]