[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Assertion failure usign boost::format with Visual C++2005
From: |
J.S. Otis |
Subject: |
Assertion failure usign boost::format with Visual C++2005 |
Date: |
Wed, 18 Jan 2006 14:49:26 -0500 |
Hello,
Here is a sample that generates an assertion failure with Visual C++
2005 using boost 1.33.1.
A NULL ptr is passed to std::string::append() by
boost::io::detail::mk_str().
////////////////////////////////////////////////////////////////////
#include <boost/format.hpp>
int main(int argc, char* argv[])
{
std::string str(""); // Empty string.
boost::format frmt( "%s" );
std::string res = ( frmt % str ).str();
return 0;
}
////////////////////////////////////////////////////////////////////
This is due to all the assert statements added in the new "secure" STL
that is shipped with VC2005.
But still, I don't think passing NULL to string::append() is correct
anyway...
Regards.
J.S.Otis
Software Developper
InnovMetric Software Inc.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Assertion failure usign boost::format with Visual C++2005,
J.S. Otis <=