n.torrey.pines wrote:
In VC++2005 debug mode (Ctrl-F5), this little program aborts:
+++++++++++++ begin ++++++++++++++++++++++++ #include <iostream> #include
int main(int argc, char * argv[]) { boost::program_options::options_description desc("Allowed options"); desc.add_options() ("some_option", "\ This option description SHOULD be long enough not to fit in one line"); std::cout << desc << '\n'; } ++++++++++++ end +++++++++++++++++++++++++++
The debug assertion failure message is:
File: C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xstring Line: 173
Through multiple trials, I found that the error occurs if and only if the option description is long enough not to fit in one line in the window.
This is boost-1_33_1
Since I have no prior experience with program_options, perhaps I'm using it incorrectly?
This is a combination of somewhat sloppy code in the formatting code, and somewhat unreasonable runtime checking in VC++2005. This is supposed to be fixed in CVS, can you try it? - Volodya