Index: boost/boost/token_functions.hpp =================================================================== --- boost/boost/token_functions.hpp (revision 20302) +++ boost/boost/token_functions.hpp (working copy) @@ -335,12 +335,13 @@ if (next == end) return false; - if (current_offset_ == offsets_.size()) + if (current_offset_ == offsets_.size()) { if (wrap_offsets_) current_offset_=0; else return false; - + } + int c = offsets_[current_offset_]; int i = 0; for (; i < c; ++i) { @@ -448,14 +449,15 @@ else { // m_empty_tokens == keep_empty_tokens // Handle empty token at the end - if (next == end) + if (next == end) { if (m_output_done == false) { m_output_done = true; assigner::assign(start,next,tok); return true; } else return false; - + } + if (is_kept(*next)) { if (m_output_done == false) m_output_done = true; Index: boost/boost/regex/v4/cpp_regex_traits.hpp =================================================================== --- boost/boost/regex/v4/cpp_regex_traits.hpp (revision 20302) +++ boost/boost/regex/v4/cpp_regex_traits.hpp (working copy) @@ -41,6 +41,7 @@ #include #include +#include #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX