We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b620e5 commit 5c99bdcCopy full SHA for 5c99bdc
common/regex-partial.h
@@ -2,7 +2,6 @@
2
3
#include <regex>
4
#include <string>
5
-#include "ggml.h"
6
7
enum common_regex_match_type {
8
COMMON_REGEX_MATCH_TYPE_NONE,
@@ -14,7 +13,9 @@ struct common_string_range {
14
13
size_t begin;
15
size_t end;
16
common_string_range(size_t begin, size_t end) : begin(begin), end(end) {
17
- GGML_ASSERT(begin <= end);
+ if (begin > end) {
+ throw std::runtime_error("Invalid range");
18
+ }
19
}
20
// prevent default ctor
21
common_string_range() = delete;
0 commit comments