diff --git a/git-main/enum__name__impl_8hpp_source.html b/git-main/enum__name__impl_8hpp_source.html
index defac16..e4def7f 100644
--- a/git-main/enum__name__impl_8hpp_source.html
+++ b/git-main/enum__name__impl_8hpp_source.html
@@ -198,124 +198,132 @@
150 "", enum_type::template name<Enum, Is>()...};
- 162 template <
typename Enum,
int Min,
int Max>
-
-
+
+ 162 MGUTILITY_CNSTXPR
inline auto
+ 163 get_enum_array() noexcept
+ 164 -> std::array<
mgutility::string_view, Max - Min + 1>
- 166 MGUTILITY_CNSTXPR
auto arr =
- 167 get_enum_array<Enum>(detail::make_enum_sequence<Enum, Min, Max>());
- 168 const auto index{std::find(arr.begin() + 1, arr.end(), str)};
-
-
- 171 std::distance(arr.begin(), index) + Min - 1)};
-
-
- 183 template <
typename Enum,
int Min,
int Max>
-
-
-
-
-
- 189 if (str.find(
'|') == mgutility::string_view::npos)
-
- 191 return to_enum_impl<Enum, Min, Max>(str);
-
-
-
- 195 std::size_t index = 0;
-
- 197 for (std::size_t i = 0; i < str.size(); ++i)
-
-
-
- 201 auto name = str.substr(index, i - index);
- 202 auto maybe_enum = to_enum_impl<Enum, Min, Max>(name);
+ 166 return get_enum_array<Enum>(detail::make_enum_sequence<Enum, Min, Max>());
+
+
+ 178 template <
typename Enum,
int Min,
int Max>
+
+
+
+ 182 MGUTILITY_CNSTXPR
auto arr =
+ 183 get_enum_array<Enum, Min, Max>();
+ 184 const auto index{std::find(arr.begin() + 1, arr.end(), str)};
+
+
+ 187 std::distance(arr.begin(), index) + Min - 1)};
+
+
+ 199 template <
typename Enum,
int Min,
int Max>
+
+
+
- 204 if (!name.empty() && maybe_enum)
-
- 206 result.emplace(result ?
static_cast<Enum
>(*result | *maybe_enum)
-
-
+
+ 205 if (str.find(
'|') == mgutility::string_view::npos)
+
+ 207 return to_enum_impl<Enum, Min, Max>(str);
+
-
-
-
-
- 214 auto maybe_enum = to_enum_impl<Enum, Min, Max>(str.substr(index));
- 215 if (result && maybe_enum)
-
- 217 result.emplace(
static_cast<Enum
>(*result | *maybe_enum));
-
-
-
-
-
-
-
-
-
- 236 template <
typename Enum,
int Min,
int Max,
- 237 detail::enable_if_t<!detail::has_bit_or<Enum>::value,
bool> =
true>
- 238 MGUTILITY_CNSTXPR
auto enum_name_impl(Enum e)
noexcept
-
-
- 241 MGUTILITY_CNSTXPR
auto arr =
- 242 get_enum_array<Enum>(detail::make_enum_sequence<Enum, Min, Max>());
- 243 const auto index{(Min < 0 ? Min * -1 : Min) +
static_cast<int>(e) + 1};
- 244 return arr[(index < Min || index > arr.size() - 1) ? 0 : index];
-
-
- 257 template <
typename Enum,
int Min,
int Max,
- 258 detail::enable_if_t<detail::has_bit_or<Enum>::value,
bool> =
true>
-
- 260 -> detail::string_or_view_t<Enum>
-
+
+ 211 std::size_t index = 0;
+
+ 213 for (std::size_t i = 0; i < str.size(); ++i)
+
+
+
+ 217 auto name = str.substr(index, i - index);
+ 218 auto maybe_enum = to_enum_impl<Enum, Min, Max>(name);
+
+ 220 if (!name.empty() && maybe_enum)
+
+ 222 result.emplace(result ?
static_cast<Enum
>(*result | *maybe_enum)
+
+
+
+
+
+
+
+ 230 auto maybe_enum = to_enum_impl<Enum, Min, Max>(str.substr(index));
+ 231 if (result && maybe_enum)
+
+ 233 result.emplace(
static_cast<Enum
>(*result | *maybe_enum));
+
+
+
+
+
+
+
+
+
+ 252 template <
typename Enum,
int Min,
int Max,
+ 253 detail::enable_if_t<!detail::has_bit_or<Enum>::value,
bool> =
true>
+ 254 MGUTILITY_CNSTXPR
auto enum_name_impl(Enum e)
noexcept
+
+
+ 257 MGUTILITY_CNSTXPR
auto arr =
+ 258 get_enum_array<Enum, Min, Max>();
+ 259 const auto index{(Min < 0 ? Min * -1 : Min) +
static_cast<int>(e) + 1};
+ 260 return arr[(index < Min || index > arr.size() - 1) ? 0 : index];
+
-
- 264 MGUTILITY_CNSTXPR
auto arr =
- 265 get_enum_array<Enum>(detail::make_enum_sequence<Enum, Min, Max>());
-
-
- 268 const auto index = (Min < 0 ? -Min : Min) +
static_cast<int>(e) + 1;
-
- 270 arr[(index < Min || index >=
static_cast<int>(arr.size())) ? 0 : index];
-
-
- 273 const auto is_digit = [](
char c)
- 274 {
return c >=
'0' && c <=
'9'; };
-
-
- 277 if (!name.empty() && !is_digit(name[0]))
-
- 279 return std::string{name};
-
-
-
- 283 std::string bitmasked_name;
- 284 for (
auto i = Min; i < Max; ++i)
-
- 286 const auto idx = (Min < 0 ? -Min : Min) + i + 1;
- 287 if (idx >= 0 && idx <
static_cast<int>(arr.size()) && !arr[idx].empty() &&
- 288 !is_digit(arr[idx][0]) &&
- 289 (e &
static_cast<Enum
>(i)) ==
static_cast<Enum
>(i))
-
- 291 bitmasked_name.append(arr[idx]).append(
"|");
-
-
-
-
- 296 if (!bitmasked_name.empty())
-
- 298 bitmasked_name.pop_back();
-
-
- 301 return bitmasked_name.find(
'|') != std::string::npos ? bitmasked_name
-
-
-
-
-
-
+ 273 template <
typename Enum,
int Min,
int Max,
+ 274 detail::enable_if_t<detail::has_bit_or<Enum>::value,
bool> =
true>
+
+ 276 -> detail::string_or_view_t<Enum>
+
+
+
+ 280 MGUTILITY_CNSTXPR
auto arr =
+ 281 get_enum_array<Enum, Min, Max>();
+
+
+ 284 const auto index = (Min < 0 ? -Min : Min) +
static_cast<int>(e) + 1;
+
+ 286 arr[(index < Min || index >=
static_cast<int>(arr.size())) ? 0 : index];
+
+
+ 289 const auto is_digit = [](
char c)
+ 290 {
return c >=
'0' && c <=
'9'; };
+
+
+ 293 if (!name.empty() && !is_digit(name[0]))
+
+ 295 return std::string{name};
+
+
+
+ 299 std::string bitmasked_name;
+ 300 for (
auto i = Min; i < Max; ++i)
+
+ 302 const auto idx = (Min < 0 ? -Min : Min) + i + 1;
+ 303 if (idx >= 0 && idx <
static_cast<int>(arr.size()) && !arr[idx].empty() &&
+ 304 !is_digit(arr[idx][0]) &&
+ 305 (e &
static_cast<Enum
>(i)) ==
static_cast<Enum
>(i))
+
+ 307 bitmasked_name.append(arr[idx]).append(
"|");
+
+
+
+
+ 312 if (!bitmasked_name.empty())
+
+ 314 bitmasked_name.pop_back();
+
+
+ 317 return bitmasked_name.find(
'|') != std::string::npos ? bitmasked_name
+
+
+
+
+
+
A basic string view class template.
Definition string_view.hpp:62
A class template that provides optional (nullable) objects.
Definition optional.hpp:64
#define MGUTILITY_CNSTXPR_CLANG_WA
Defines the MGUTILITY_CNSTXPR macro based on the C++ standard.
Definition definitions.hpp:69
@@ -323,6 +331,7 @@
auto nullopt
A global instance of nullopt_t to represent null optional.
Definition optional.hpp:336
Definition enum_name_impl.hpp:80
static MGUTILITY_CNSTXPR auto name() noexcept -> mgutility::string_view
Gets the name of an unscoped enum value.
Definition enum_name_impl.hpp:91
+Provides the range for an enumeration type.
Definition meta.hpp:161