// Boost lpath.hpp ---------------------------------------------------------// // Copyright Beman Dawes 2005 // Use, modification, and distribution is subject to 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) // See library home page at http://www.boost.org/libs/filesystem #include #include // for std::mbstate_t #include #include // for std::streamoff namespace std { // Note well: this specialization is meant only to support wide_test.cpp. // It is not fully functional, fully correct, or efficient. template<> struct char_traits { typedef long char_type; typedef long int_type; typedef streamoff off_type; typedef streampos pos_type; typedef mbstate_t state_type; static void assign(char_type& c1, const char_type& c2){c1=c2;} static bool eq(const char_type& c1, const char_type& c2){return c1==c2;} static bool lt(const char_type& c1, const char_type& c2){return c1 lstring; struct lpath_traits; typedef boost::filesystem::basic_path lpath; struct lpath_traits { typedef lstring internal_string_type; typedef std::string external_string_type; static external_string_type to_external( const lpath &, const internal_string_type & src ) { external_string_type tmp; for ( internal_string_type::const_iterator it( src.begin() ); it != src.end(); ++it ) { tmp += static_cast(*it); } return tmp; } static internal_string_type to_internal( const external_string_type & src ) { internal_string_type tmp; for ( external_string_type::const_iterator it( src.begin() ); it != src.end(); ++it ) tmp += *it; return tmp; } }; } // namespace user namespace boost { namespace filesystem2 { template<> struct is_basic_path { static const bool value = true; }; } }