Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / outcome / doc / src / content / reference / traits / is_error_type.md
1 +++
2 title = "`is_error_type<E>`"
3 description = "A customisable integral constant type true for `E` types which are to receive error throwing no-value policies."
4 +++
5
6 A customisable integral constant type true for `E` types which are to receive
7 error throwing no-value policies. Special weakened implicit construction enable
8 is available for integral `T` types when combined with `E` types in this
9 whitelist -- this permits `boost_result<int, boost::system::errc::errc_t` to
10 retain its implicit constructors, despite the fact that `errc_t` as a C enum
11 has an implicit conversion to `int`.
12
13 *Overridable*: By template specialisation into the `trait` namespace.
14
15 *Default*: False. Specialisations to true exist for:
16
17 - `<boost/outcome/boost_result.hpp>`
18     - `boost::system::error_code`
19     - `boost::system::errc::errc_t`
20     - `boost::exception_ptr`
21
22 - `<boost/outcome/std_result.hpp>`
23     - `std::error_code`
24     - `std::errc`
25     - `std::exception_ptr`
26
27 *Namespace*: `BOOST_OUTCOME_V2_NAMESPACE::trait`
28
29 *Header*: `<boost/outcome/trait.hpp>`