Move is_name_start to core

This commit is contained in:
Victor Zverovich 2021-05-06 08:12:24 -07:00
parent 23892caf53
commit 849c9f6168
2 changed files with 4 additions and 4 deletions

View File

@ -1927,6 +1927,10 @@ FMT_CONSTEXPR const Char* parse_align(const Char* begin, const Char* end,
struct auto_id {}; struct auto_id {};
template <typename Char> FMT_CONSTEXPR bool is_name_start(Char c) {
return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || '_' == c;
}
template <typename Char, typename IDHandler> template <typename Char, typename IDHandler>
FMT_CONSTEXPR const Char* do_parse_arg_id(const Char* begin, const Char* end, FMT_CONSTEXPR const Char* do_parse_arg_id(const Char* begin, const Char* end,
IDHandler&& handler) { IDHandler&& handler) {

View File

@ -2263,10 +2263,6 @@ class arg_formatter : public arg_formatter_base<OutputIt, Char> {
} }
}; };
template <typename Char> FMT_CONSTEXPR bool is_name_start(Char c) {
return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || '_' == c;
}
template <typename Context> class custom_formatter { template <typename Context> class custom_formatter {
private: private:
using char_type = typename Context::char_type; using char_type = typename Context::char_type;