Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58232 - trunk/libs/program_options/src
From: s.ochsenknecht_at_[hidden]
Date: 2009-12-08 01:02:24


Author: s_ochsenknecht
Date: 2009-12-08 01:02:23 EST (Tue, 08 Dec 2009)
New Revision: 58232
URL: http://svn.boost.org/trac/boost/changeset/58232

Log:
Modify assert, potentially Fixes #773
Text files modified:
   trunk/libs/program_options/src/options_description.cpp | 4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)

Modified: trunk/libs/program_options/src/options_description.cpp
==============================================================================
--- trunk/libs/program_options/src/options_description.cpp (original)
+++ trunk/libs/program_options/src/options_description.cpp 2009-12-08 01:02:23 EST (Tue, 08 Dec 2009)
@@ -121,7 +121,9 @@
         std::string name(_name);
         string::size_type n = name.find(',');
         if (n != string::npos) {
- assert(n == name.size()-2);
+ // this potentially fails on VC++ when compiled
+ // with /MDd (?), See Ticket #773
+ assert(n == name.size() - 2*sizeof(string::value_type));
             m_long_name = name.substr(0, n);
             m_short_name = '-' + name.substr(n+1,1);
         } else {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk