regex_error_type
regex_error_type (정규식 오류 타입)
std::regex_constants::error_type은 정규식 라이브러리에서 발생할 수 있는 오류를 설명하는 타입이에요. C++11부터 사용할 수 있어요.
출처: cppreference
본문
<regex> 헤더에 정의되어 있고, 시그니처는 다음과 같아요.
using error_type = /* implementation-defined */;
(1) (since C++11)
constexpr error_type error_collate = /* unspecified */;
constexpr error_type error_ctype = /* unspecified */;
constexpr error_type error_escape = /* unspecified */;
constexpr error_type error_backref = /* unspecified */;
constexpr error_type error_brack = /* unspecified */;
constexpr error_type error_paren = /* unspecified */;
constexpr error_type error_brace = /* unspecified */;
constexpr error_type error_badbrace = /* unspecified */;
constexpr error_type error_range = /* unspecified */;
constexpr error_type error_space = /* unspecified */;
constexpr error_type error_badrepeat = /* unspecified */;
constexpr error_type error_complexity = /* unspecified */;
constexpr error_type error_stack = /* unspecified */;
(2) (since C++11) (inline since C++17)
-
- error_type은 정규식 라이브러리에서 발생할 수 있는 오류를 설명하는 타입이에요.
오류 상수 (Error constants)
| 상수 | 의미 |
|---|---|
| error_collate | 유효하지 않은 collating 요소 |
| error_ctype | 유효하지 않은 문자 클래스 |
| error_escape | 유효하지 않은 이스케이프 문자 또는 꼬리 이스케이프 |
| error_backref | 유효하지 않은 역참조 |
| error_brack | 대괄호 불균형 |
| error_paren | 괄호 불균형 |
| error_brace | 중괄호 불균형 |
| error_badbrace | 중괄호 안의 유효하지 않은 범위 |
| error_range | 범위에서 유효하지 않은 문자 |
| error_space | 메모리 부족 |
| error_badrepeat | 반복(예: *가 표현식 시작에) |
| error_complexity | 계산 복잡도가 미리 정한 수준을 초과 |
| error_stack | 스택 공간 부족 |