Yes, you are absolutely right about the environment not being the same.
There is a distinct possibility that I tweaked something somewhere which I
wasn't supposed to... And, you probably don't even use the same compiler
(Intel 7.0) and STLport as I do.
Anyway, I will put in the suggested trace output in the files you suggested,
but I will have to postpone untill I finish the coding (work) I have to
complete right now.
Thanks for the help!
Greetings,
Andre
----- Original Message -----
From: "Jeff Garland"
On Thu, 12 Jun 2003 08:33:53 +0200, adutoit wrote
Hi.
The following little proggie bombs if I compile it with /O3 optimisation in Windows, using Intel compiler 7.0 and STLport (whatever the latest version number is). In short, I cannot use to_simple_string in any of my programs if I have any form of optimisation turned on.
Unfortunately it is very hard for me to help since I don't have your environment. Perhaps you can put some I/O traces in to see if we can isolate where it is crashing. Perhaps you annotate boost/date_time/date_formatting.hpp ~ line 69 in ymd_formatter, method ymd_to_string. Here's what you are looking for. I've added a few cout's to gather data:
static std::string ymd_to_string(ymd_type ymd) { typedef typename ymd_type::month_type month_type; std::ostringstream ss; ss << ymd.year; std::cout << "year ok" << std::endl; if (format_type::has_date_sep_chars()) { ss << format_type::month_sep_char(); } file://this name is a bit ugly, oh well.... month_formatter
::format_month(ymd.month, ss); std::cout << "month format ok" << std::endl; if (format_type::has_date_sep_chars()) { ss << format_type::day_sep_char(); } std::cout << "month ok" << std::endl; ss << std::setw(2) << std::setfill('0') << ymd.day; std::cout << "day ok" << std::endl;
return ss.str(); }
Also, this shouldn't matter, but try changing your test to remove the leading '0' from the month:
std::cout << to_simple_string( date( 2003,6,12) ) << std::endl;
Thx,
Jeff
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/