base: Remove the ability to cprintf stringstreams directly.
The cprintf functions don't know ahead of time what format characters
are going to be used with what underlying data types, and so any
type must be minimally usable with the default specialization of
format_integer, format_char, format_float and format_string. All of
those functions ultimately print their parameter with out << data
except the one which prints stringstreams. That function accesses the
buffer of the string stream with .str(), and then prints that instead.
That should technically work out ok as long as stringstreams are only
printed using %s, but there's no way to guarantee that ahead of time.
To avoid that problem, and because gem5 doesn't ever actually use the
ability to print stringstreams directly, this change removes that
feature and modifies the corresponding part of the unit test.
If we ever do want to print the contents of a string stream, it won't
be difficult to add a .str() to it.
Reviewed-by: Jason Lowe-Power <firstname.lastname@example.org>
Maintainer: Gabe Black <email@example.com>
2 files changed