Skip to content

Commit 1b8322e

Browse files
committed
fix trac 9544: gcc 4.9.0 -std=c++1y breakage
This is GCC bug PR C++/59681 but the Boost fix is trivial and the GCC one is (probably) not. See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59681
1 parent a3075dd commit 1b8322e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/boost/regex/v4/basic_regex_creator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ re_literal* basic_regex_creator<charT, traits>::append_literal(charT c)
344344
m_last_state = result = static_cast<re_literal*>(getaddress(off));
345345
charT* characters = static_cast<charT*>(static_cast<void*>(result+1));
346346
characters[result->length] = m_traits.translate(c, m_icase);
347-
++(result->length);
347+
result->length += 1;
348348
}
349349
return result;
350350
}

include/boost/regex/v4/basic_regex_parser.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
971971
// the last state was a literal with more than one character, split it in two:
972972
re_literal* lit = static_cast<re_literal*>(this->m_last_state);
973973
charT c = (static_cast<charT*>(static_cast<void*>(lit+1)))[lit->length - 1];
974-
--(lit->length);
974+
lit->length -= 1;
975975
// now append new state:
976976
lit = static_cast<re_literal*>(this->append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT)));
977977
lit->length = 1;

0 commit comments

Comments
 (0)