7#ifndef BOOST_LOCALE_DETAIL_IS_SUPPORTED_CHAR_HPP_INCLUDED
8#define BOOST_LOCALE_DETAIL_IS_SUPPORTED_CHAR_HPP_INCLUDED
10#include <boost/locale/config.hpp>
14namespace boost {
namespace locale {
namespace detail {
16 template<
typename Char>
17 struct is_supported_char : std::false_type {};
20 struct is_supported_char<char> : std::true_type {};
22 struct is_supported_char<wchar_t> : std::true_type {};
25 struct is_supported_char<char8_t> : std::true_type {};
28#ifdef BOOST_LOCALE_ENABLE_CHAR16_T
30 struct is_supported_char<char16_t> : std::true_type {};
33#ifdef BOOST_LOCALE_ENABLE_CHAR32_T
35 struct is_supported_char<char32_t> : std::true_type {};
38 template<
typename Char>
39 using enable_if_is_supported_char =
typename std::enable_if<is_supported_char<Char>::value>::type;
43#define BOOST_LOCALE_ASSERT_IS_SUPPORTED(Char) \
44 static_assert(boost::locale::detail::is_supported_char<Char>::value, "Unsupported Char type")