Update of /cvsroot/cppunit/cppunit2/include/cpput
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8599/include/cpput
Modified Files:
stringize.h
Log Message:
* use deprecated ostrstream if the standard one are not available.
Index: stringize.h
===================================================================
RCS file: /cvsroot/cppunit/cppunit2/include/cpput/stringize.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** stringize.h 27 Feb 2005 10:15:41 -0000 1.3
--- stringize.h 5 Mar 2005 12:41:18 -0000 1.4
***************
*** 93,97 ****
# ifndef CPPUT_NO_DEFAULT_STRINGIZE
! # include <sstream>
namespace CppUT {
--- 93,101 ----
# ifndef CPPUT_NO_DEFAULT_STRINGIZE
! # ifndef CPPTL_NO_SSTREAM
! # include <sstream>
! # else // standard stream are not available, use the deprecated one
! # include <strstream>
! # endif
namespace CppUT {
***************
*** 102,108 ****
--- 106,118 ----
static std::string stringize( const ValueType &value )
{
+ # ifndef CPPTL_NO_SSTREAM
std::ostringstream os;
os << value;
return os.str();
+ # else // standard stream are not available, use the deprecated one
+ std::ostrstream os;
+ os << value;
+ return std::string( std::ostrstream::str(), pcount() );
+ # endif
}
};
|