summaryrefslogtreecommitdiff
path: root/boost/wave/util/cpp_include_paths.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/wave/util/cpp_include_paths.hpp')
-rw-r--r--boost/wave/util/cpp_include_paths.hpp23
1 files changed, 9 insertions, 14 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);
}
///////////////////////////////////////////////////////////////////////////////