www.digitalmars.com         C & C++   DMDScript  

c++ - STLport-4.0 I/O streams: internal error

When trying to use stream manipulators ("cout << endl") with
STLport's I/O streams I get an "internal error: out 625".

I tried to track it down, but couldn't reproduce the internal error:

  template<class T>
  struct A
  {
    int operator<< (int (*f)(A<T> &))
    {
      return f(*this);
    }
  };

  template<class T>
  inline int f(A<T> &a)
  { 
    return 0;
  }

  int main(int argc, char *argv[])
  {
    A<char> a;
    return a << f;
    // Error: illegal operand types
    // Had: A<char >
  }


But I do get an internal error with the following test-case (which isn't
legal C++):

  template<class T>
  void f()
  { }

  int main(int argc, char *argv[])
  {
    f;
    // Warning 6: value of expression is not used
    // Internal error: out 625
    return 0;
  }


bye, Christof

-- 
http://cmeerw.cjb.net                          Jabber: cmeerw jabber.at
mailto cmeerw at web.de                   ICQ: 93773535, Yahoo!: cmeerw

...and what have you contributed to the Net?
Oct 15 2001