Skip to content

Commit 8772aea

Browse files
committed
fix msvc issue std::cmatch and string_view
1 parent 82412f0 commit 8772aea

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/randomization.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ auto GetRandomInRange(std::string_view section,
2727
auto result = std::make_pair(true, std::string{});
2828
selected_value = -1;
2929

30-
std::cmatch random_match;
31-
32-
if (std::regex_match(section.cbegin(), section.cend(), random_match, kRandomExpr)) {
30+
std::match_results<std::string_view::const_iterator> random_match;
31+
if (std::regex_match(section.begin(), section.end(), random_match, kRandomExpr)) {
3332
// Random range, parse left and right numbers
3433
auto left = std::stoi(random_match[1].str());
3534
auto right = std::stoi(random_match[2].str());

0 commit comments

Comments
 (0)