[PURRS-devel] Problem with symbol's default constructor?

Roberto Bagnara bagnara at cs.unipr.it
Tue Jan 21 13:36:50 CET 2003


Hi all,

there seems to be a problem with the default constructor
of GiNaC::symbol.  Here is a program that shows what happens:

#include <ginac/ginac.h>
#include <iostream>

int main() {
   GiNaC::symbol s;
   std::cout << s << std::endl;
}

If this is executed under, e.g., emacs,
it prints

symbol0^@

that is, a NUL (ASCII 0) character is printed just
after "symbol0".

This is probably caused by the presence of
" << std::end" in the following template function:

template<class T>
std::string ToString(const T & t)
{
         std::ostringstream buf;
         buf << t << std::ends;
         return buf.str();
}

IMHO, " << std::ends" should be simply erased.
All the best

     Roberto

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it




More information about the PURRS-devel mailing list