This commit is contained in:
terik23 2019-03-23 18:51:06 +05:00
parent e294349df9
commit 976269d821

View file

@ -48,12 +48,12 @@ struct identity final {
using type = T; using type = T;
}; };
[[nodiscard]] constexpr bool is_name_char(char s) noexcept { [[nodiscard]] constexpr bool is_name_char(char c) noexcept {
return (s >= '0' && s <= '9') || (s >= 'a' && s <= 'z') || (s >= 'A' && s <= 'Z') || s == '_'; return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_';
} }
[[nodiscard]] constexpr bool is_bracket_char(char s) noexcept { [[nodiscard]] constexpr bool is_bracket_char(char c) noexcept {
return s == ')' || s == '}' || s == '>' || s == '(' || s == '{' || s == '<'; return c == ')' || c == '}' || c == '>' || c == '(' || c == '{' || c == '<';
} }
[[nodiscard]] constexpr std::string_view pretty_name(std::string_view name, bool with_suffix) noexcept { [[nodiscard]] constexpr std::string_view pretty_name(std::string_view name, bool with_suffix) noexcept {