$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r51678 - branches/release/boost/wave/util
From: hartmut.kaiser_at_[hidden]
Date: 2009-03-09 21:29:35
Author: hkaiser
Date: 2009-03-09 21:29:35 EDT (Mon, 09 Mar 2009)
New Revision: 51678
URL: http://svn.boost.org/trac/boost/changeset/51678
Log:
Wave: Added missing file
Added:
   branches/release/boost/wave/util/filesystem_compatibility.hpp   (contents, props changed)
Added: branches/release/boost/wave/util/filesystem_compatibility.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/wave/util/filesystem_compatibility.hpp	2009-03-09 21:29:35 EDT (Mon, 09 Mar 2009)
@@ -0,0 +1,103 @@
+/*=============================================================================
+    Boost.Wave: A Standard compliant C++ preprocessor library
+
+    http://www.boost.org/
+
+    Copyright (c) 2001-2009 Hartmut Kaiser. Distributed under the Boost
+    Software License, Version 1.0. (See accompanying file
+    LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+#if !defined(BOOST_WAVE_FILESYSTEM_COMPATIBILITY_MAR_09_2009_0142PM)
+#define BOOST_WAVE_FILESYSTEM_COMPATIBILITY_MAR_09_2009_0142PM
+
+#include <string>
+
+#include <boost/filesystem/path.hpp>
+#include <boost/filesystem/operations.hpp>
+
+namespace boost { namespace wave { namespace util
+{
+///////////////////////////////////////////////////////////////////////////////
+// filesystem wrappers allowing to handle different Boost versions
+#if !defined(BOOST_FILESYSTEM_NO_DEPRECATED)
+// interface wrappers for older Boost versions
+    inline boost::filesystem::path initial_path()
+    {
+        return boost::filesystem::initial_path(); 
+    }
+
+    inline boost::filesystem::path current_path()
+    {
+        return boost::filesystem::current_path(); 
+    }
+
+    template <typename String>
+    inline boost::filesystem::path create_path(String const& p)
+    {
+        return boost::filesystem::path(p, boost::filesystem::native);
+    }
+
+    inline std::string leaf(boost::filesystem::path const& p) 
+    { 
+        return p.leaf(); 
+    }
+
+    inline boost::filesystem::path branch_path(boost::filesystem::path const& p) 
+    { 
+        return p.branch_path(); 
+    }
+
+    inline boost::filesystem::path normalize(boost::filesystem::path& p)
+    {
+        return p.normalize();
+    }
+
+    inline std::string native_file_string(boost::filesystem::path const& p) 
+    { 
+        return p.native_file_string(); 
+    }
+
+#else
+// interface wrappers if deprecated functions do not exist
+    inline boost::filesystem::path initial_path()
+    { 
+        return boost::filesystem::initial_path<boost::filesystem::path>();
+    }
+
+    inline boost::filesystem::path current_path()
+    { 
+        return boost::filesystem::current_path<boost::filesystem::path>();
+    }
+
+    template <typename String>
+    inline boost::filesystem::path create_path(String const& p)
+    {
+        return boost::filesystem::path(p);
+    }
+
+    inline std::string leaf(boost::filesystem::path const& p) 
+    { 
+        return p.filename(); 
+    }
+
+    inline boost::filesystem::path branch_path(boost::filesystem::path const& p) 
+    { 
+        return p.parent_path(); 
+    }
+
+    inline boost::filesystem::path normalize(boost::filesystem::path& p)
+    {
+        return p; // function doesn't exist anymore
+    }
+
+    inline std::string native_file_string(boost::filesystem::path const& p) 
+    { 
+        return p.file_string(); 
+    }
+
+#endif
+
+}}}
+
+#endif