summaryrefslogtreecommitdiff
path: root/boost/wave
diff options
context:
space:
mode:
Diffstat (limited to 'boost/wave')
-rw-r--r--boost/wave/util/cpp_include_paths.hpp23
-rw-r--r--boost/wave/util/cpp_iterator.hpp2
-rw-r--r--boost/wave/util/flex_string.hpp2
-rw-r--r--boost/wave/wave_config.hpp9
4 files changed, 16 insertions, 20 deletions
diff --git a/boost/wave/util/cpp_include_paths.hpp b/boost/wave/util/cpp_include_paths.hpp
index d0f2fcbaa8..e5e17c8d03 100644
--- a/boost/wave/util/cpp_include_paths.hpp
+++ b/boost/wave/util/cpp_include_paths.hpp
@@ -15,6 +15,7 @@
#include <list>
#include <utility>
+#include <boost/assert.hpp>
#include <boost/wave/wave_config.hpp>
#include <boost/wave/util/filesystem_compatibility.hpp>
@@ -58,8 +59,7 @@ struct bidirectional_map
typedef std::pair<FromType, ToType> value_type;
#if defined(BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS) || \
- (defined(BOOST_MSVC) && \
- ( (BOOST_MSVC < 1300) || (BOOST_MSVC == 1600) )) || \
+ (defined(BOOST_MSVC) && (BOOST_MSVC == 1600) ) || \
(defined(BOOST_INTEL_CXX_VERSION) && \
(defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 700)))
@@ -442,18 +442,13 @@ void include_paths::set_current_directory(char const *path_)
fs::path filepath (create_path(path_));
fs::path filename = util::complete_path(filepath, current_dir);
- if (fs::exists(filename) && fs::is_directory(filename)) {
- current_rel_dir.clear();
- if (!as_relative_to(filepath, current_dir, current_rel_dir))
- current_rel_dir = filepath;
- current_dir = filename;
- }
- else {
- current_rel_dir.clear();
- if (!as_relative_to(branch_path(filepath), current_dir, current_rel_dir))
- current_rel_dir = branch_path(filepath);
- current_dir = branch_path(filename);
- }
+
+ BOOST_ASSERT(!(fs::exists(filename) && fs::is_directory(filename)));
+
+ current_rel_dir.clear();
+ if (!as_relative_to(branch_path(filepath), current_dir, current_rel_dir))
+ current_rel_dir = branch_path(filepath);
+ current_dir = branch_path(filename);
}
///////////////////////////////////////////////////////////////////////////////
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);
diff --git a/boost/wave/util/flex_string.hpp b/boost/wave/util/flex_string.hpp
index 21c7e75fd1..73c604682c 100644
--- a/boost/wave/util/flex_string.hpp
+++ b/boost/wave/util/flex_string.hpp
@@ -1988,7 +1988,7 @@ public:
flex_string& replace(size_type pos, size_type n1, const value_type* s)
{ return replace(pos, n1, s, traits_type::length(s)); }
- // Replaces at most n1 chars of *this, starting with pos, with n2 occurences of c
+ // Replaces at most n1 chars of *this, starting with pos, with n2 occurrences of c
// consolidated with
// Replaces at most n1 chars of *this, starting with pos,
// with at most n2 chars of str.
diff --git a/boost/wave/wave_config.hpp b/boost/wave/wave_config.hpp
index ec712ef16d..bd29a8a89d 100644
--- a/boost/wave/wave_config.hpp
+++ b/boost/wave/wave_config.hpp
@@ -186,7 +186,9 @@
#endif
#if BOOST_WAVE_SUPPORT_THREADING != 0
-#define BOOST_SPIRIT_THREADSAFE 1
+#ifndef BOOST_SPIRIT_THREADSAFE
+#define BOOST_SPIRIT_THREADSAFE
+#endif
#define PHOENIX_THREADSAFE 1
#else
// disable thread support in Boost.Pool
@@ -202,8 +204,7 @@
// VC7 isn't able to compile the flex_string class, fall back to std::string
// CW up to 8.3 chokes as well *sigh*
// Tru64/CXX has linker problems when using flex_string
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \
- BOOST_WORKAROUND(__MWERKS__, < 0x3200) || \
+#if BOOST_WORKAROUND(__MWERKS__, < 0x3200) || \
(defined(__DECCXX) && defined(__alpha)) || \
defined(BOOST_WAVE_STRINGTYPE_USE_STDSTRING)
@@ -228,7 +229,7 @@
// BOOST_WAVE_STRINGTYPE above.
#include <boost/wave/util/flex_string.hpp>
-#endif // BOOST_WORKAROUND(_MSC_VER, <= 1300) et.al.
+#endif // BOOST_WORKAROUND(__MWERKS__, < 0x3200) et.al.
#endif // !defined(BOOST_WAVE_STRINGTYPE)
///////////////////////////////////////////////////////////////////////////////