
I wish to use the boost::filesystem library with some Windows apps and want to define TCHAR-friendly types. I *think* the following code should do the trick, giving me a boost::filesystem::tpath type, but is there anything I've missed? tpath.hpp #include <boost/filesystem.hpp> namespace boost { namespace filesystem { struct tpath_traits; typedef basic_path<std::basic_string<TCHAR>, tpath_traits> tpath; struct tpath_traits { typedef std::basic_string<TCHAR> internal_string_type; typedef std::basic_string<TCHAR> external_string_type; static external_string_type to_external( const tpath &, const internal_string_type & src ) { return src; } static internal_string_type to_internal( const external_string_type & src ) { return src; } }; } // filesystem } // boost