1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00

update doc

This commit is contained in:
neargye 2023-08-14 18:41:40 +04:00
parent 4904822db8
commit 45c8b5d92c
3 changed files with 17 additions and 1 deletions

View file

@ -301,7 +301,7 @@ class case_insensitive {
public:
template <typename L, typename R>
constexpr auto operator()(L lhs,R rhs) const noexcept -> std::enable_if_t<std::is_same_v<std::decay_t<L>, char_type> && std::is_same_v<std::decay_t<R>, char_type>, bool> {
constexpr auto operator()(L lhs, R rhs) const noexcept -> std::enable_if_t<std::is_same_v<std::decay_t<L>, char_type> && std::is_same_v<std::decay_t<R>, char_type>, bool> {
return Op{}(to_lower(lhs), to_lower(rhs));
}
};
@ -434,6 +434,7 @@ constexpr auto n() noexcept {
name.str_ += 37;
}
#elif defined(_MSC_VER)
// CLI/C++ workaround (see https://github.com/Neargye/magic_enum/issues/284).
str_view name;
name.str_ = __FUNCSIG__;
name.str_ += 40;
@ -511,6 +512,7 @@ constexpr auto n() noexcept {
#elif defined(_MSC_VER)
str_view name;
if ((__FUNCSIG__[5] == '_' && __FUNCSIG__[35] != '(') || (__FUNCSIG__[5] == 'c' && __FUNCSIG__[41] != '(')) {
// CLI/C++ workaround (see https://github.com/Neargye/magic_enum/issues/284).
name.str_ = __FUNCSIG__;
name.str_ += 35;
name.size_ = sizeof(__FUNCSIG__) - 52;
@ -548,6 +550,7 @@ constexpr auto n() noexcept {
constexpr auto name_ptr = MAGIC_ENUM_GET_ENUM_NAME_BUILTIN(V);
auto name = name_ptr ? str_view{name_ptr, std::char_traits<char>::length(name_ptr)} : str_view{};
# else
// CLI/C++ workaround (see https://github.com/Neargye/magic_enum/issues/284).
str_view name;
name.str_ = __FUNCSIG__;
name.size_ = sizeof(__FUNCSIG__) - 17;