43#ifndef MIO_STRING_UTIL_HPP
44#define MIO_STRING_UTIL_HPP
48namespace mio {
namespace detail {
50 template <typename S, typename C = typename std::decay<S>::type,
51 typename =
decltype(std::declval<C>().data()),
52 typename =
typename std::enable_if<
53 std::is_same<typename C::value_type, char>::value
55 || std::is_same<typename C::value_type, wchar_t>::value
60 using type =
typename C::value_type;
102 struct char_type<const wchar_t*>
104 using type = wchar_t;
108 struct char_type<wchar_t[N]>
110 using type = wchar_t;
114 struct char_type<const wchar_t[N]>
116 using type = wchar_t;
120 template <
typename CharT,
typename S>
123 static constexpr bool value = std::is_same<
126 typename std::add_pointer<
typename std::remove_cv<
typename std::remove_pointer<
127 typename std::decay<S>::type>::type>::type>::type>
::value;
130 template <
typename S>
137 template <
typename S>
144 template <
typename S>
149 || is_c_wstr<S>::value
154 template <typename String, typename = decltype(std::declval<String>().data()),
160 template <typename String, typename = decltype(std::declval<String>().empty()),
166 template <
typename String,
167 typename =
typename std::enable_if<is_c_str_or_c_wstr<String>::value>::type>
172 template <
typename String,
173 typename =
typename std::enable_if<is_c_str_or_c_wstr<String>::value>::type>
175 return !path || (*path == 0);
const char_type< String >::type * c_str(const String &path)
Definition string_util.hpp:156
bool empty(const String &path)
Definition string_util.hpp:162
Definition string_util.hpp:48
char type
Definition string_util.hpp:73
char type
Definition string_util.hpp:85
char type
Definition string_util.hpp:79
char type
Definition string_util.hpp:91
Definition string_util.hpp:59
typename C::value_type type
Definition string_util.hpp:60
Definition string_util.hpp:65
typename char_type_helper< T >::type type
Definition string_util.hpp:66
Definition string_util.hpp:122
static constexpr bool value
Definition string_util.hpp:123
Definition string_util.hpp:146
static constexpr bool value
Definition string_util.hpp:147
Definition string_util.hpp:132
static constexpr bool value
Definition string_util.hpp:133