Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-03-13 08:51:55

0001 //
0002 // Copyright (c) 2012 Artyom Beilis (Tonkikh)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0.
0005 // https://www.boost.org/LICENSE_1_0.txt
0006 
0007 #ifndef BOOST_NOWIDE_INTEGRATION_FILESYSTEM_HPP_INCLUDED
0008 #define BOOST_NOWIDE_INTEGRATION_FILESYSTEM_HPP_INCLUDED
0009 
0010 #include <boost/nowide/utf8_codecvt.hpp>
0011 #include <boost/filesystem/path.hpp>
0012 
0013 namespace boost {
0014 namespace nowide {
0015     ///
0016     /// Install utf8_codecvt facet into boost::filesystem::path
0017     /// such that all char strings are interpreted as UTF-8 strings
0018     /// \return The previous imbued path locale.
0019     ///
0020     inline std::locale nowide_filesystem()
0021     {
0022         std::locale tmp = std::locale(std::locale(), new boost::nowide::utf8_codecvt<wchar_t>());
0023         return boost::filesystem::path::imbue(tmp);
0024     }
0025 } // namespace nowide
0026 } // namespace boost
0027 
0028 #endif