#include "platform_config.hpp"
#include <boost/config/warning_disable.hpp>
#include <boost/filesystem/config.hpp>
#include <boost/filesystem/detail/path_traits.hpp>
#include <boost/system/error_category.hpp>
#include <locale>
#include <string>
#include "private_config.hpp"
#include <boost/filesystem/detail/header.hpp>
namespace boost {
namespace filesystem {
namespace {
#if (defined(BOOST_GCC) && BOOST_GCC >= 40600) || defined(BOOST_CLANG)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif
class codecvt_error_cat final :
public boost::system::error_category
{
public:
BOOST_SYSTEM_CONSTEXPR codecvt_error_cat() noexcept {}
const char* name() const noexcept override;
std::string message(int ev) const override;
};
const char* codecvt_error_cat::name() const noexcept
{
return "codecvt";
}
std::string codecvt_error_cat::message(int ev) const
{
std::string str;
switch (ev)
{
case std::codecvt_base::ok:
str = "ok";
break;
case std::codecvt_base::partial:
str = "partial";
break;
case std::codecvt_base::error:
str = "error";
break;
case std::codecvt_base::noconv:
str = "noconv";
break;
default:
str = "unknown error";
break;
}
return str;
}
#if (defined(BOOST_GCC) && BOOST_GCC >= 40600) || defined(BOOST_CLANG)
#pragma GCC diagnostic pop
#endif
}
BOOST_FILESYSTEM_DECL boost::system::error_category const& codecvt_error_category() noexcept
{
static
#if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
constexpr
#else
const
#endif
codecvt_error_cat codecvt_error_cat_const;
return codecvt_error_cat_const;
}
#if !defined(BOOST_SYSTEM_HAS_CONSTEXPR) && !defined(_MSC_VER)
namespace {
struct codecvt_error_category_initializer
{
codecvt_error_category_initializer() { boost::filesystem::codecvt_error_category(); }
};
BOOST_FILESYSTEM_INIT_PRIORITY(BOOST_FILESYSTEM_PATH_GLOBALS_INIT_PRIORITY) BOOST_ATTRIBUTE_UNUSED BOOST_FILESYSTEM_ATTRIBUTE_RETAIN
const codecvt_error_category_initializer g_codecvt_error_category_initializer;
}
#endif
} }
#include <boost/filesystem/detail/footer.hpp>