fix: clang < 16 can't emplace back struct with no constructor

pull/2563/head
Brenno Lemos 2023-10-12 17:30:32 -03:00
parent ee652677a6
commit c59264d6b4
1 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,12 @@ struct Rule {
std::regex rule; std::regex rule;
std::string repr; std::string repr;
int priority; int priority;
// Fix for Clang < 16
// See https://en.cppreference.com/w/cpp/compiler_support/20 "Parenthesized initialization of
// aggregates"
Rule(std::regex rule, std::string repr, int priority)
: rule(rule), repr(repr), priority(priority) {}
}; };
int default_priority_function(std::string& key); int default_priority_function(std::string& key);