# litert::Unexpected


`#include <litert_expected.h>`

A utility for generic return values that represents a failure.

## Summary

| ### Constructors and Destructors ||
|---|---|
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1a69c16c39276c09009fd725ff009c8663(Status status, std::string message)` ||
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1a2c39dcfd788d3474690f05f44f5915bf(LiteRtStatus status, std::string message)` ||
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1a0ff7bb7c68e90bae7b7b9e71cad0f85d(First && first, Rest &&... rest)` ||
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1aae6b8672d75e92627ccf6e5120024e09(class https://developers.google.com/edge/api/litert/c/classlitert/1-1-error#classlitert_1_1_error && e)` Allows for implicit conversion from a convertible `https://developers.google.com/edge/api/litert/c/classlitert/1-1-error#classlitert_1_1_error` value in-place. ||
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1adf98a56d3cc1c765fc1117a10e4eff43(https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected && other)` ||
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1afe107120b9d7476b90f687a080ba9215(const https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected & other)` ||

| ### Public functions ||
|---|---|
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1ad9ec6a35cce855174af33bb43ac83126() const &noexcept` | `constexpr const class https://developers.google.com/edge/api/litert/c/classlitert/1-1-error#classlitert_1_1_error &` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1a616bdde6c905cabf4d2f341fb0d682a3()&noexcept` | `constexpr class https://developers.google.com/edge/api/litert/c/classlitert/1-1-error#classlitert_1_1_error &` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1a3744cfca97b4cb510492617d340a20e8() const &&noexcept` | `constexpr const class https://developers.google.com/edge/api/litert/c/classlitert/1-1-error#classlitert_1_1_error &&` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1a663688a35416b2b80adfc4b9353f2cb7()&&noexcept` | `constexpr class https://developers.google.com/edge/api/litert/c/classlitert/1-1-error#classlitert_1_1_error &&` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1a96063d99560ff4ef5c119cc2008b6033(https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected && other)=default` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected &` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1ac25b3a4cf79c3e6916c524c961b91b42(const https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected & other)=default` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected &` |

| ### Friend classes ||
|---|---|
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-unexpected#classlitert_1_1_unexpected_1ab47a27a85d0c0aaaaa384d933cfdc801` | `friend void` |

## Public functions

### Error

```
constexpr const class Error & Error() const &noexcept
```

### Error

```
constexpr class Error & Error()&noexcept
```

### Error

```
constexpr const class Error && Error() const &&noexcept
```

### Error

```
constexpr class Error && Error()&&noexcept
```

### Unexpected

```
 Unexpected(
  Status status,
  std::string message
)
```

### Unexpected

```
 Unexpected(
  LiteRtStatus status,
  std::string message
)
```

### Unexpected

```
constexpr Unexpected(
  First && first,
  Rest &&... rest
)
```

### Unexpected

```
 Unexpected(
  class Error && e
)
```
Allows for implicit conversion from a convertible `https://developers.google.com/edge/api/litert/c/classlitert/1-1-error#classlitert_1_1_error` value in-place.

### Unexpected

```
 Unexpected(
  Unexpected && other
)=default
```

### Unexpected

```
 Unexpected(
  const Unexpected & other
)=default
```

### operator=

```
Unexpected & operator=(
  Unexpected && other
)=default
```

### operator=

```
Unexpected & operator=(
  const Unexpected & other
)=default
```

## Friend classes

### AbslStringify

```
friend void AbslStringify(Sink &sink, const Unexpected &unexpected)
```