编译如下:
// file main.cpp
#include <string>
#include <boost/lexical_cast.hpp>
int main()
{
boost::lexical_cast<std::string>( 656.16 );
return 0;
}
产生于此:
/usr/local/include/boost/lexical_cast.hpp:1184: warning: ISO C++ does not support the ‘%lg’ printf format
为什么?如何避免这个警告?