Re: [Boost-bugs] [Boost C++ Libraries] #773: program_options find assert fails with multibyte characters

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #773: program_options find assert fails with multibyte characters
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-26 07:14:10


#773: program_options find assert fails with multibyte characters
---------------------+------------------------------------------------------
  Reporter: nobody | Owner: vladimir_prus
      Type: Bugs | Status: reopened
 Milestone: | Component: program_options
   Version: None | Severity: Problem
Resolution: | Keywords:
---------------------+------------------------------------------------------

Comment(by greg.ruthenbeck_at_[hidden]):

 This bug is only present when compiler option "Code Generation" is set to
 /MDd (Multi-threaded Debug DLL). If compiling as /MTd (using Linker option
 /Force:Multiple) the bug is not present.

 The bug occurs on line 121, options_description.cpp, when string::npos is
 incorrect after string::find() call.
 Example:
 When string _name = "version,v", the following code has n = 11, and
 name.size() = 8.
         std::string name(_name);
         string::size_type n = name.find(',');
         if (n != string::npos) {
             assert(n == name.size()-2);

 This suggests that the lib I am linking against "libboost_program_options-
 vc80-mt-gd-1_38.lib" has been built incorrectly? Since I don't have the
 source I cannot rebuild at this time to test this.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/773#comment:6>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC