# libtmux::unexpected

- **Module:** libtmux
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/85e8bd603a322dc32bb8b9aeb1a72bcf36945f1d/include/libtmux/expected.hpp#L43
- **Page:** https://libtmux.org/reference/cxx/libtmux-unexpected/

```
libtmux::unexpected(typename Error, error: Error &&) -> typename Error
```

A factory rather than an alias: an alias template cannot deduce its argument, so `unexpected(error)` would stop compiling at every call site.
