summaryrefslogtreecommitdiff
path: root/boost/wave/util/cpp_iterator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/wave/util/cpp_iterator.hpp')
-rw-r--r--boost/wave/util/cpp_iterator.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/boost/wave/util/cpp_iterator.hpp b/boost/wave/util/cpp_iterator.hpp
index 999d961908..9d61b82f2a 100644
--- a/boost/wave/util/cpp_iterator.hpp
+++ b/boost/wave/util/cpp_iterator.hpp
@@ -607,7 +607,7 @@ pp_iterator_functor<ContextT>::operator()()
break;
}
- if (whitespace.must_insert(id, act_token.get_value())) {
+ if (token_is_valid(act_token) && whitespace.must_insert(id, act_token.get_value())) {
// must insert some whitespace into the output stream to avoid adjacent
// tokens, which would form different (and wrong) tokens
whitespace.shift_tokens(T_SPACE);