CINT stringstream bug

From: Philip Rodrigues <p.rodrigues1_at_physics.ox.ac.uk>
Date: Mon, 31 Mar 2008 17:33:34 +0100


The following code snippet (attached as a macro), produces different results in interpreted mode and when compiled (with recent development root):

stringstream s("a b c");
string tmp;
while (s >> tmp) cout << tmp << endl;

For some reason, the "s >> tmp" evaluates to false one "step" too early in interpreted mode. Example session is below.

dev pplxgenng:~> root -q cint_stringstream.C Processing cint_stringstream.C...
a
b

dev pplxgenng:~> root -q cint_stringstream.C+ Processing cint_stringstream.C+...
a
b
c

Regards,
Philip

Received on Mon Mar 31 2008 - 18:33:47 CEST

This archive was generated by hypermail 2.2.0 : Tue Apr 01 2008 - 17:50:01 CEST