Skip to content

Commit f00e305

Browse files
author
Sascha Ochsenknecht
committed
Modify assert, potentially Fixes #773
[SVN r58232]
1 parent 69bb59d commit f00e305

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/options_description.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ namespace boost { namespace program_options {
121121
std::string name(_name);
122122
string::size_type n = name.find(',');
123123
if (n != string::npos) {
124-
assert(n == name.size()-2);
124+
// this potentially fails on VC++ when compiled
125+
// with /MDd (?), See Ticket #773
126+
assert(n == name.size() - 2*sizeof(string::value_type));
125127
m_long_name = name.substr(0, n);
126128
m_short_name = '-' + name.substr(n+1,1);
127129
} else {

0 commit comments

Comments
 (0)