# std::match_results<BidirIt,Alloc>::empty

> C++ Atlas: `cppatlas.com/w/cpp/regex/match_results/empty` | Source: https://en.cppreference.com/w/cpp/regex/match_results/empty | Domain: Regular expressions | Standards: C++11

Checks whether the match was successful.

## Official Specification Summary (cppreference)

```cpp
bool empty() const; // (since C++11)
```

Checks whether the match was successful.

### Parameters

(none)

### Return value

`true` if `*this` represents the result of a failed match, `false` otherwise, i.e. `size() == 0`.

### Exceptions

May throw implementation-defined exceptions.

### Complexity

Constant.

### See also

- [`size`](https://en.cppreference.com/w/cpp/regex/match_results/size): returns the number of matches in a fully-established result state (public member function)

---
Attribution: content from https://en.cppreference.com/w/cpp/regex/match_results/empty (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.