+++ title = "result<R, S>" weight = 20 +++
namespace outcome_v2_xxx { namespace policy { template <class T, class EC, class E> using default_policy = std::conditional_t<std::is_void<EC>::value && std::is_void<E>::value, terminate, std::conditional_t<trait::has_error_code_v<EC>, error_code_throw_as_system_error<T, EC, E>, std::conditional_t<trait::has_exception_ptr_v<EC> || trait::has_exception_ptr_v<E>, exception_ptr_rethrow<T, EC, E>, all_narrow> >>; }
<span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">using</span> <a href="#standardese-outcome_v2_xxx::is_result%3CT%3E"><span class="typ dec var fun">is_result</span></a> <span class="pun">=</span> <span class="typ dec var fun">'hidden'</span><span class="pun">;</span> <span class="typ dec var fun">template</span> <span class="pun"><</span><span class="typ dec var fun">class</span> <span class="kwd">T</span><span class="pun">></span><span class="typ dec var fun">static</span> <span class="typ dec var fun">constexpr</span> <span class="typ dec var fun">bool</span> <span class="kwd">is_result_v</span> <span class="pun">=</span> <span class="kwd">detail</span><span class="pun">::</span><span class="kwd">is_result</span><span class="pun"><</span><span class="kwd">std</span><span class="pun">::</span><span class="kwd">decay_t</span><span class="pun"><</span><span class="kwd">T</span><span class="pun">>></span><span class="pun">::</span><span class="kwd">value</span><span class="pun">;</span> <span class="kwd">namespace</span> <a href="standardese_entities.md#standardese-outcome_v2_xxx::hooks"><span class="typ dec var fun">hooks</span></a> <span class="pun">{</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">U</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="kwd">void</span> <a href="#standardese-outcome_v2_xxx::hooks::hook_result_construction%3CT,U%3E(T*,U&&)"><span class="typ dec var fun">hook_result_construction</span></a><span class="pun">(</span><span class="typ dec var fun">T</span><span class="pun">*</span><span class="pun">,</span> <span class="typ dec var fun">U</span><span class="pun">&&</span><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">U</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="kwd">void</span> <a href="#standardese-outcome_v2_xxx::hooks::hook_result_copy_construction%3CT,U%3E(T*,U&&)"><span class="typ dec var fun">hook_result_copy_construction</span></a><span class="pun">(</span><span class="typ dec var fun">T</span><span class="pun">*</span><span class="pun">,</span> <span class="typ dec var fun">U</span><span class="pun">&&</span><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">U</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="kwd">void</span> <a href="#standardese-outcome_v2_xxx::hooks::hook_result_move_construction%3CT,U%3E(T*,U&&)"><span class="typ dec var fun">hook_result_move_construction</span></a><span class="pun">(</span><span class="typ dec var fun">T</span><span class="pun">*</span><span class="pun">,</span> <span class="typ dec var fun">U</span><span class="pun">&&</span><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">U</span><span class="pun">,</span> <span class="kwd">class</span> <span class="pun">...</span> <span class="typ dec var fun">Args</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="kwd">void</span> <a href="#standardese-outcome_v2_xxx::hooks::hook_result_in_place_construction%3CT,U,Args%3E(T*,in_place_type_t%3CU%3E,Args&&...)"><span class="typ dec var fun">hook_result_in_place_construction</span></a><span class="pun">(</span><span class="typ dec var fun">T</span><span class="pun">*</span><span class="pun">,</span> <a href="doc_value_storage.md#standardese-outcome_v2_xxx::in_place_type_t%3CT%3E"><span class="typ dec var fun">in_place_type_t</span></a><span class="pun"><</span>U<span class="pun">></span><span class="pun">,</span> Args &&...<span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">R</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">S</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">NoValuePolicy</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="typ dec var fun">uint16_t</span> <a href="#standardese-outcome_v2_xxx::hooks::spare_storage%3CR,S,NoValuePolicy%3E(detail::result_final%3CR,S,NoValuePolicy%3Econst*)"><span class="typ dec var fun">spare_storage</span></a><span class="pun">(</span><span class="typ dec var fun">'hidden'</span> <span class="kwd">const</span><span class="pun">*</span> <span class="typ dec var fun">r</span><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">R</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">S</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">NoValuePolicy</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="kwd">void</span> <a href="#standardese-outcome_v2_xxx::hooks::set_spare_storage%3CR,S,NoValuePolicy%3E(detail::result_final%3CR,S,NoValuePolicy%3E*,uint16_t)"><span class="typ dec var fun">set_spare_storage</span></a><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">*</span> <span class="typ dec var fun">r</span><span class="pun">,</span> <span class="typ dec var fun">uint16_t</span> <span class="typ dec var fun">v</span><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="pun">}</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E.R"><span class="typ dec var fun">R</span></a><span class="pun">,</span> <span class="kwd">class</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E.S"><span class="typ dec var fun">S</span></a><span class="pun">,</span> <span class="kwd">class</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E.NoValuePolicy"><span class="typ dec var fun">NoValuePolicy</span></a><span class="pun">></span> <span class="kwd">class</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E"><span class="typ dec var fun">result</span></a><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">R</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">S</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">P</span><span class="pun">></span> <span class="kwd">void</span> <a href="#standardese-outcome_v2_xxx::swap%3CR,S,P%3E(result%3CR,S,P%3E&,result%3CR,S,P%3E&)"><span class="typ dec var fun">swap</span></a><span class="pun">(</span><a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E"><span class="typ dec var fun">result</span></a><span class="pun"><</span>R, S, P<span class="pun">></span><span class="pun">&</span> <span class="typ dec var fun">a</span><span class="pun">,</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E"><span class="typ dec var fun">result</span></a><span class="pun"><</span>R, S, P<span class="pun">></span><span class="pun">&</span> <span class="typ dec var fun">b</span><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="typ dec var fun">static</span> <span class="typ dec var fun">constexpr</span> <span class="typ dec var fun">bool</span> <span class="kwd">is_result_v</span> <span class="pun">=</span> <span class="kwd">detail</span><span class="pun">::</span><span class="kwd">is_result</span><span class="pun"><</span><span class="kwd">std</span><span class="pun">::</span><span class="kwd">decay_t</span><span class="pun"><</span><span class="kwd">T</span><span class="pun">>></span><span class="pun">::</span><span class="kwd">value</span><span class="pun">;</span> <span class="typ dec var fun">static</span> <span class="typ dec var fun">constexpr</span> <span class="typ dec var fun">bool</span> <span class="kwd">is_result_v</span> <span class="pun">=</span> <span class="kwd">detail</span><span class="pun">::</span><span class="kwd">is_result</span><span class="pun"><</span><span class="kwd">std</span><span class="pun">::</span><span class="kwd">decay_t</span><span class="pun"><</span><span class="kwd">T</span><span class="pun">>></span><span class="pun">::</span><span class="kwd">value</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">R</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">S</span> <span class="pun">=</span> std::error_code<span class="pun">></span> <span class="kwd">using</span> <a href="#standardese-outcome_v2_xxx::unchecked%3CR,S%3E"><span class="typ dec var fun">unchecked</span></a> <span class="pun">=</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E"><span class="typ dec var fun">result</span></a><span class="pun"><</span>R, S, policy::all_narrow<span class="pun">></span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">R</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">S</span> <span class="pun">=</span> std::error_code<span class="pun">></span> <span class="kwd">using</span> <a href="#standardese-outcome_v2_xxx::checked%3CR,S%3E"><span class="typ dec var fun">checked</span></a> <span class="pun">=</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E"><span class="typ dec var fun">result</span></a><span class="pun"><</span>R, S, policy::throw_bad_result_access<S><span class="pun">></span><span class="pun">;</span>
}
template <class T, class EC, class E>
using default_policy = std::conditional_t<std::is_void<EC>::value && std::is_void<E>::value, terminate, std::conditional_t<trait::has_error_code_v<EC>, error_code_throw_as_system_error<T, EC, E>, std::conditional_t<trait::has_exception_ptr_v<EC> || trait::has_exception_ptr_v<E>, exception_ptr_rethrow<T, EC, E>, all_narrow> >>;
Default policy selector.
template <class T>
using is_result = 'hidden';
True if a result
template <class T>static constexpr bool is_result_v = detail::is_result<std::decay_t<T>>::value;
True if a result
template <class T, class U>
constexpr void hook_result_construction(T*, U&&) noexcept;
The default instantiation hook implementation called when a result
is first created by conversion from one of its possible types. Does nothing.
WARNING: The compiler is permitted to elide calls to constructors, and thus this hook may not get called when you think it should!
result<...>
being constructed.
template <class T, class U>
constexpr void hook_result_copy_construction(T*, U&&) noexcept;
The default instantiation hook implementation called when a result
is created by copying from another result
. Does nothing.
WARNING: The compiler is permitted to elide calls to constructors, and thus this hook may not get called when you think it should!
result<...>
being constructed.
template <class T, class U>
constexpr void hook_result_move_construction(T*, U&&) noexcept;
The default instantiation hook implementation called when a result
is created by moving from another result
. Does nothing.
WARNING: The compiler is permitted to elide calls to constructors, and thus this hook may not get called when you think it should!
result<...>
being constructed.
template <class T, class U, class ... Args>
constexpr void hook_result_in_place_construction(T*, in_place_type_t<U>, Args &&...) noexcept;
The default instantiation hook implementation called when a result
is created by in place construction. Does nothing.
WARNING: The compiler is permitted to elide calls to constructors, and thus this hook may not get called when you think it should!
result<...>
being constructed.
template <class R, class S, class NoValuePolicy>
constexpr uint16_t spare_storage('hidden' const* r) noexcept;
Retrieves the 16 bits of spare storage in result/outcome.
template <class R, class S, class NoValuePolicy>
constexpr void set_spare_storage('hidden'* r, uint16_t v) noexcept;
Sets the 16 bits of spare storage in result/outcome.
template <class R, class S, class NoValuePolicy> class result { public: //=== Member types ===// using value_type = R;
<span class="kwd">using</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::error_type"><span class="typ dec var fun">error_type</span></a> <span class="pun">=</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E.S"><span class="typ dec var fun">S</span></a><span class="pun">;</span> <span class="kwd">using</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::value_type_if_enabled"><span class="typ dec var fun">value_type_if_enabled</span></a> <span class="pun">=</span> typename base::_value_type<span class="pun">;</span> <span class="kwd">using</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::error_type_if_enabled"><span class="typ dec var fun">error_type_if_enabled</span></a> <span class="pun">=</span> typename base::_error_type<span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">U</span> <span class="pun">=</span> S<span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">V</span> <span class="pun">=</span> policy::default_policy<T,U,void><span class="pun">></span> <span class="kwd">using</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::rebind%3CT,U,V%3E"><span class="typ dec var fun">rebind</span></a> <span class="pun">=</span> <span class="typ dec var fun">result</span><span class="pun"><</span>T, U, V<span class="pun">></span><span class="pun">;</span>
protected: struct predicate;
public: //=== Default, copy/move constructors and assignment ===// result() = delete;
<a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result(result%3CR,S,NoValuePolicy%3E&&)"><span class="typ dec var fun">result</span></a><span class="pun">(</span>result<R, S, NoValuePolicy><span class="pun">&&</span><span class="pun">)</span> <span class="pun">=</span> <span class="kwd">default</span><span class="pun">;</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result(constresult%3CR,S,NoValuePolicy%3E&)"><span class="typ dec var fun">result</span></a><span class="pun">(</span>const result<R, S, NoValuePolicy><span class="pun">&</span><span class="pun">)</span> <span class="pun">=</span> <span class="kwd">default</span><span class="pun">;</span> result<R, S, NoValuePolicy><span class="pun">&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::operator=(result%3CR,S,NoValuePolicy%3E&&)"><span class="typ dec var fun">operator=</span></a><span class="pun">(</span>result<R, S, NoValuePolicy><span class="pun">&&</span><span class="pun">)</span> <span class="pun">=</span> <span class="kwd">default</span><span class="pun">;</span> result<R, S, NoValuePolicy><span class="pun">&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::operator=(constresult%3CR,S,NoValuePolicy%3E&)"><span class="typ dec var fun">operator=</span></a><span class="pun">(</span>const result<R, S, NoValuePolicy><span class="pun">&</span><span class="pun">)</span> <span class="pun">=</span> <span class="kwd">default</span><span class="pun">;</span> <span class="typ dec var fun">~result</span><span class="pun">(</span><span class="pun">)</span> <span class="pun">=</span> <span class="kwd">default</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(T&&,outcome_v2_xxx::result::value_converting_constructor_tag)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><span class="typ dec var fun">T</span><span class="pun">&&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(T&&,outcome_v2_xxx::result::value_converting_constructor_tag).t"><span class="typ dec var fun">t</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(T&&,outcome_v2_xxx::result::error_converting_constructor_tag)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><span class="typ dec var fun">T</span><span class="pun">&&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(T&&,outcome_v2_xxx::result::error_converting_constructor_tag).t"><span class="typ dec var fun">t</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">ErrorCondEnum</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CErrorCondEnum,,%3E(ErrorCondEnum&&,outcome_v2_xxx::result::error_condition_converting_constructor_tag)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><span class="typ dec var fun">ErrorCondEnum</span><span class="pun">&&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CErrorCondEnum,,%3E(ErrorCondEnum&&,outcome_v2_xxx::result::error_condition_converting_constructor_tag).t"><span class="typ dec var fun">t</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,,%3E(T&&,outcome_v2_xxx::result::explicit_valueorerror_converting_constructor_tag)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><span class="typ dec var fun">T</span><span class="pun">&&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,,%3E(T&&,outcome_v2_xxx::result::explicit_valueorerror_converting_constructor_tag).o"><span class="typ dec var fun">o</span></a><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">U</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">V</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,U,V,%3E(result%3CT,U,V%3Econst&)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><span class="typ dec var fun">result</span><span class="pun"><</span>T, U, V<span class="pun">></span> <span class="kwd">const</span><span class="pun">&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,U,V,%3E(result%3CT,U,V%3Econst&).o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">U</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">V</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,U,V,%3E(result%3CT,U,V%3E&&)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><span class="typ dec var fun">result</span><span class="pun"><</span>T, U, V<span class="pun">></span><span class="pun">&&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,U,V,%3E(result%3CT,U,V%3E&&).o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="pun">...</span> <span class="typ dec var fun">Args</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CArgs,%3E(in_place_type_t%3Coutcome_v2_xxx::result::value_type_if_enabled%3E,Args&&...)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><a href="doc_value_storage.md#standardese-outcome_v2_xxx::in_place_type_t%3CT%3E"><span class="typ dec var fun">in_place_type_t</span></a><span class="pun"><</span>outcome_v2_xxx::result::value_type_if_enabled<span class="pun">></span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CArgs,%3E(in_place_type_t%3Coutcome_v2_xxx::result::value_type_if_enabled%3E,Args&&...)._"><span class="typ dec var fun">_</span></a><span class="pun">,</span> Args &&... <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CArgs,%3E(in_place_type_t%3Coutcome_v2_xxx::result::value_type_if_enabled%3E,Args&&...).args"><span class="typ dec var fun">args</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">U</span><span class="pun">,</span> <span class="kwd">class</span> <span class="pun">...</span> <span class="typ dec var fun">Args</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CU,Args,%3E(in_place_type_t%3Coutcome_v2_xxx::result::value_type_if_enabled%3E,std::initializer_list%3CU%3E,Args&&...)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><a href="doc_value_storage.md#standardese-outcome_v2_xxx::in_place_type_t%3CT%3E"><span class="typ dec var fun">in_place_type_t</span></a><span class="pun"><</span>outcome_v2_xxx::result::value_type_if_enabled<span class="pun">></span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CU,Args,%3E(in_place_type_t%3Coutcome_v2_xxx::result::value_type_if_enabled%3E,std::initializer_list%3CU%3E,Args&&...)._"><span class="typ dec var fun">_</span></a><span class="pun">,</span> <span class="typ dec var fun">std::initializer_list</span><span class="pun"><</span>U<span class="pun">></span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CU,Args,%3E(in_place_type_t%3Coutcome_v2_xxx::result::value_type_if_enabled%3E,std::initializer_list%3CU%3E,Args&&...).il"><span class="typ dec var fun">il</span></a><span class="pun">,</span> Args &&... <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CU,Args,%3E(in_place_type_t%3Coutcome_v2_xxx::result::value_type_if_enabled%3E,std::initializer_list%3CU%3E,Args&&...).args"><span class="typ dec var fun">args</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="pun">...</span> <span class="typ dec var fun">Args</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CArgs,%3E(in_place_type_t%3Coutcome_v2_xxx::result::error_type_if_enabled%3E,Args&&...)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><a href="doc_value_storage.md#standardese-outcome_v2_xxx::in_place_type_t%3CT%3E"><span class="typ dec var fun">in_place_type_t</span></a><span class="pun"><</span>outcome_v2_xxx::result::error_type_if_enabled<span class="pun">></span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CArgs,%3E(in_place_type_t%3Coutcome_v2_xxx::result::error_type_if_enabled%3E,Args&&...)._"><span class="typ dec var fun">_</span></a><span class="pun">,</span> Args &&... <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CArgs,%3E(in_place_type_t%3Coutcome_v2_xxx::result::error_type_if_enabled%3E,Args&&...).args"><span class="typ dec var fun">args</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">U</span><span class="pun">,</span> <span class="kwd">class</span> <span class="pun">...</span> <span class="typ dec var fun">Args</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CU,Args,%3E(in_place_type_t%3Coutcome_v2_xxx::result::error_type_if_enabled%3E,std::initializer_list%3CU%3E,Args&&...)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><a href="doc_value_storage.md#standardese-outcome_v2_xxx::in_place_type_t%3CT%3E"><span class="typ dec var fun">in_place_type_t</span></a><span class="pun"><</span>outcome_v2_xxx::result::error_type_if_enabled<span class="pun">></span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CU,Args,%3E(in_place_type_t%3Coutcome_v2_xxx::result::error_type_if_enabled%3E,std::initializer_list%3CU%3E,Args&&...)._"><span class="typ dec var fun">_</span></a><span class="pun">,</span> <span class="typ dec var fun">std::initializer_list</span><span class="pun"><</span>U<span class="pun">></span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CU,Args,%3E(in_place_type_t%3Coutcome_v2_xxx::result::error_type_if_enabled%3E,std::initializer_list%3CU%3E,Args&&...).il"><span class="typ dec var fun">il</span></a><span class="pun">,</span> Args &&... <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CU,Args,%3E(in_place_type_t%3Coutcome_v2_xxx::result::error_type_if_enabled%3E,std::initializer_list%3CU%3E,Args&&...).args"><span class="typ dec var fun">args</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">A1</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">A2</span><span class="pun">,</span> <span class="kwd">class</span> <span class="pun">...</span> <span class="typ dec var fun">Args</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CA1,A2,Args,%3E(A1&&,A2&&,Args&&...)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><span class="typ dec var fun">A1</span><span class="pun">&&</span> <span class="typ dec var fun">a1</span><span class="pun">,</span> <span class="typ dec var fun">A2</span><span class="pun">&&</span> <span class="typ dec var fun">a2</span><span class="pun">,</span> Args &&... <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CA1,A2,Args,%3E(A1&&,A2&&,Args&&...).args"><span class="typ dec var fun">args</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result(success_type%3Cvoid%3Econst&)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><a href="success_failure#standardese-outcome_v2_xxx::success_type%3CT%3E"><span class="typ dec var fun">success_type</span></a><span class="pun"><</span>void<span class="pun">></span> <span class="kwd">const</span><span class="pun">&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result(success_type%3Cvoid%3Econst&).o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(success_type%3CT%3Econst&)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><a href="success_failure#standardese-outcome_v2_xxx::success_type%3CT%3E"><span class="typ dec var fun">success_type</span></a><span class="pun"><</span>T<span class="pun">></span> <span class="kwd">const</span><span class="pun">&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(success_type%3CT%3Econst&).o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(success_type%3CT%3E&&)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><a href="success_failure#standardese-outcome_v2_xxx::success_type%3CT%3E"><span class="typ dec var fun">success_type</span></a><span class="pun"><</span>T<span class="pun">></span><span class="pun">&&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(success_type%3CT%3E&&).o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(failure_type%3CT%3Econst&)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><a href="success_failure#standardese-outcome_v2_xxx::failure_type%3CEC,E%3E"><span class="typ dec var fun">failure_type</span></a><span class="pun"><</span>T<span class="pun">></span> <span class="kwd">const</span><span class="pun">&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(failure_type%3CT%3Econst&).o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">constexpr</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(failure_type%3CT%3E&&)"><span class="typ dec var fun">result</span></a><span class="pun">(</span><a href="success_failure#standardese-outcome_v2_xxx::failure_type%3CEC,E%3E"><span class="typ dec var fun">failure_type</span></a><span class="pun"><</span>T<span class="pun">></span><span class="pun">&&</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::result%3CT,%3E(failure_type%3CT%3E&&).o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">void</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::swap(result%3CR,S,NoValuePolicy%3E&)"><span class="typ dec var fun">swap</span></a><span class="pun">(</span>result<R, S, NoValuePolicy><span class="pun">&</span> <span class="typ dec var fun">o</span><span class="pun">)</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">auto</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::as_failure()const&"><span class="typ dec var fun">as_failure</span></a><span class="pun">(</span><span class="pun">)</span> <span class="kwd">const</span> <span class="pun">&</span><span class="pun">;</span> <span class="kwd">auto</span> <a href="#standardese-outcome_v2_xxx::result%3CR,S,NoValuePolicy%3E::as_failure()&&"><span class="typ dec var fun">as_failure</span></a><span class="pun">(</span><span class="pun">)</span> <span class="pun">&&</span><span class="pun">;</span> <span class="kwd">using</span> <span class="typ dec var fun">error_type</span> <span class="pun">=</span> <span class="typ dec var fun">'hidden'</span><span class="pun">;</span> //=== assume_error ===// <span class="kwd">constexpr</span> <span class="typ dec var fun">error_type</span><span class="pun">&</span> <a href="#standardese-outcome_v2_xxx::detail::result_error_observers%3CBase,EC,NoValuePolicy%3E::assume_error()&"><span class="typ dec var fun">assume_error</span></a><span class="pun">(</span><span class="pun">)</span> <span class="pun">&</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">constexpr</span> <span class="typ dec var fun">error_type</span><span class="pun">&</span> <a href="#standardese-outcome_v2_xxx::detail::result_error_observers%3CBase,EC,NoValuePolicy%3E::assume_error()&"><span class="typ dec var fun">assume_error</span></a><span class="pun">(</span><span class="pun">)</span> <span class="kwd">const</span> <span class="pun">&</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">constexpr</span> <span class="typ dec var fun">error_type</span><span class="pun">&&</span> <a href="#standardese-outcome_v2_xxx::detail::result_error_observers%3CBase,EC,NoValuePolicy%3E::assume_error()&"><span class="typ dec var fun">assume_error</span></a><span class="pun">(</span><span class="pun">)</span> <span class="pun">&&</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">constexpr</span> <span class="typ dec var fun">error_type</span><span class="pun">&&</span> <a href="#standardese-outcome_v2_xxx::detail::result_error_observers%3CBase,EC,NoValuePolicy%3E::assume_error()&"><span class="typ dec var fun">assume_error</span></a><span class="pun">(</span><span class="pun">)</span> <span class="kwd">const</span> <span class="pun">&&</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">explicit</span> <span class="kwd">operator</span> <span class="kwd">bool</span><span class="pun">(</span><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::has_value()const"><span class="typ dec var fun">has_value</span></a><span class="pun">(</span><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::has_error()const"><span class="typ dec var fun">has_error</span></a><span class="pun">(</span><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::has_exception()const"><span class="typ dec var fun">has_exception</span></a><span class="pun">(</span><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::has_failure()const"><span class="typ dec var fun">has_failure</span></a><span class="pun">(</span><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">U</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">V</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator==%3CT,U,V%3E(result_final%3CT,U,V%3Econst&)const"><span class="typ dec var fun">operator==</span></a><span class="pun">(</span><span class="typ dec var fun">'hidden'</span> <span class="kwd">const</span><span class="pun">&</span> <a href="doc_result_final.md#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator==%3CT,U,V%3E(result_final%3CT,U,V%3Econst&)const.o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator==%3CT%3E(success_type%3CT%3Econst&)const"><span class="typ dec var fun">operator==</span></a><span class="pun">(</span><a href="success_failure#standardese-outcome_v2_xxx::success_type%3CT%3E"><span class="typ dec var fun">success_type</span></a><span class="pun"><</span>T<span class="pun">></span> <span class="kwd">const</span><span class="pun">&</span> <a href="doc_result_final.md#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator==%3CT%3E(success_type%3CT%3Econst&)const.o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator==(success_type%3Cvoid%3Econst&)const"><span class="typ dec var fun">operator==</span></a><span class="pun">(</span><a href="success_failure#standardese-outcome_v2_xxx::success_type%3CT%3E"><span class="typ dec var fun">success_type</span></a><span class="pun"><</span>void<span class="pun">></span> <span class="kwd">const</span><span class="pun">&</span> <a href="doc_result_final.md#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator==(success_type%3Cvoid%3Econst&)const.o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator==%3CT%3E(failure_type%3CT,void%3Econst&)const"><span class="typ dec var fun">operator==</span></a><span class="pun">(</span><a href="success_failure#standardese-outcome_v2_xxx::failure_type%3CEC,E%3E"><span class="typ dec var fun">failure_type</span></a><span class="pun"><</span>T, void<span class="pun">></span> <span class="kwd">const</span><span class="pun">&</span> <a href="doc_result_final.md#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator==%3CT%3E(failure_type%3CT,void%3Econst&)const.o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">U</span><span class="pun">,</span> <span class="kwd">class</span> <span class="typ dec var fun">V</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator!=%3CT,U,V%3E(result_final%3CT,U,V%3Econst&)const"><span class="typ dec var fun">operator!=</span></a><span class="pun">(</span><span class="typ dec var fun">'hidden'</span> <span class="kwd">const</span><span class="pun">&</span> <a href="doc_result_final.md#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator!=%3CT,U,V%3E(result_final%3CT,U,V%3Econst&)const.o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator!=%3CT%3E(success_type%3CT%3Econst&)const"><span class="typ dec var fun">operator!=</span></a><span class="pun">(</span><a href="success_failure#standardese-outcome_v2_xxx::success_type%3CT%3E"><span class="typ dec var fun">success_type</span></a><span class="pun"><</span>T<span class="pun">></span> <span class="kwd">const</span><span class="pun">&</span> <a href="doc_result_final.md#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator!=%3CT%3E(success_type%3CT%3Econst&)const.o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator!=(success_type%3Cvoid%3Econst&)const"><span class="typ dec var fun">operator!=</span></a><span class="pun">(</span><a href="success_failure#standardese-outcome_v2_xxx::success_type%3CT%3E"><span class="typ dec var fun">success_type</span></a><span class="pun"><</span>void<span class="pun">></span> <span class="kwd">const</span><span class="pun">&</span> <a href="doc_result_final.md#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator!=(success_type%3Cvoid%3Econst&)const.o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="typ dec var fun">T</span><span class="pun">></span> <span class="kwd">constexpr</span> <span class="kwd">bool</span> <a href="#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator!=%3CT%3E(failure_type%3CT,void%3Econst&)const"><span class="typ dec var fun">operator!=</span></a><span class="pun">(</span><a href="success_failure#standardese-outcome_v2_xxx::failure_type%3CEC,E%3E"><span class="typ dec var fun">failure_type</span></a><span class="pun"><</span>T, void<span class="pun">></span> <span class="kwd">const</span><span class="pun">&</span> <a href="doc_result_final.md#standardese-outcome_v2_xxx::detail::result_final%3CR,S,NoValuePolicy%3E::operator!=%3CT%3E(failure_type%3CT,void%3Econst&)const.o"><span class="typ dec var fun">o</span></a><span class="pun">)</span> <span class="kwd">const</span> <span class="kwd">noexcept</span><span class="pun">(</span><span class="typ dec var fun">'hidden'</span><span class="pun">)</span><span class="pun">;</span>
};
Used to return from functions either (i) a successful value (ii) a cause of failure. constexpr
capable.
Any R
(value_type
) state can be observed using the member functions .value()
and .assume_value()
. Any S
(error_type
) state can be observed using the member functions .error()
and .assume_error()
.
NoValuePolicy
defaults to a policy selected according to the characteristics of type S
:
- If
.value()
called when there is novalue_type
but there is anerror_type
:
-
If
trait::has_error_code_v<S>
is true, thenthrow std::system_error(error()|make_error_code(error()))
[{{<api "policies/result_error_code_throw_as_system_error" "policy::error_code_throw_as_system_error">}}verbatim] -
If
trait::has_exception_ptr_v<S>
, thenstd::rethrow_exception(error()|make_exception_ptr(error()))
[policy::exception_ptr_rethrow<R, S, void>
] -
If
S
isvoid
, callstd::terminate()
[policy::terminate
] -
If
S
is none of the above, then it is undefined behaviour [policy::all_narrow
]
- If
.error()
called when there is noerror_type
:
-
If
trait::has_error_code_v<S>
, or iftrait::has_exception_ptr_v<S>
, or ifS
isvoid
, dothrow bad_result_access()
-
If
S
is none of the above, then it is undefined behaviour [policy::all_narrow
]
R
— The optional type of the successful result (usevoid
to disable). Cannot be a reference, ain_place_type_t<>
,success<>
,failure<>
, an array, a function or non-destructible.S
— The optional type of the failure result (usevoid
to disable). Must be eithervoid
orDefaultConstructible
. Cannot be a reference, ain_place_type_t<>
,success<>
,failure<>
, an array, a function or non-destructible.NoValuePolicy
— Policy on how to interpret typeS
when a wide observation of a not present value occurs.
(1) constexpr error_type& assume_error() & noexcept;
(2) constexpr error_type& assume_error() const & noexcept;
(3) constexpr error_type&& assume_error() && noexcept;
(4) constexpr error_type&& assume_error() const && noexcept;
Access error without runtime checks.
Preconditions: The result to have a failed state, otherwise it is undefined behaviour.
Returns: Reference to the held error_type
according to overload.
explicit operator bool() const noexcept;
Checks if has value.
Returns: True if has value.
constexpr bool has_value() const noexcept;
Checks if has value.
Returns: True if has value.
constexpr bool has_error() const noexcept;
Checks if has error.
Returns: True if has error.
constexpr bool has_exception() const noexcept;
Checks if has exception.
Returns: True if has exception.
constexpr bool has_failure() const noexcept;
Checks if has error or exception.
Returns: True if has error or exception.
template <class T, class U, class V>
constexpr bool operator==('hidden' const& o) const noexcept('hidden');
True if equal to the other result.
Effects: If a valid expression to do so, calls the operator==
operation on each of the two stored items returning true if both are true. Otherwise returns false.
Throws: Any exception the individual operator==
operations might throw.
o
— The other result to compare to.
template <class T>
constexpr bool operator==(success_type<T> const& o) const noexcept('hidden');
True if equal to the success type sugar.
Effects: If a valid expression to do so, calls the operator==
operation on the successful item returning true if equal. Otherwise returns false.
Throws: Any exception the operator==
operation might throw.
o
— The success type sugar to compare to.
constexpr bool operator==(success_type<void> const& o) const noexcept;
True if equal to the success type sugar.
Effects: If a valid expression to do so, calls the operator==
operation on the successful item returning true if equal. Otherwise returns false.
Throws: Any exception the operator==
operation might throw.
o
— The success type sugar to compare to.
template <class T>
constexpr bool operator==(failure_type<T, void> const& o) const noexcept('hidden');
True if equal to the failure type sugar.
Effects: If a valid expression to do so, calls the operator==
operation on the failure item returning true if equal. Otherwise returns false.
Throws: Any exception the operator==
operation might throw.
o
— The failure type sugar to compare to.
template <class T, class U, class V>
constexpr bool operator!=('hidden' const& o) const noexcept('hidden');
True if not equal to the other result.
Effects: If a valid expression to do so, calls the operator!=
operation on each of the two stored items, returning true if any are not equal. Otherwise returns true.
Throws: Any exception the individual operator!=
operations might throw.
o
— The other result to compare to.
template <class T>
constexpr bool operator!=(success_type<T> const& o) const noexcept('hidden');
True if not equal to the success type sugar.
Effects: If a valid expression to do so, calls the operator!=
operation on the successful item returning true if not equal. Otherwise returns false.
Throws: Any exception the operator!=
operation might throw.
o
— The success type sugar to compare to.
constexpr bool operator!=(success_type<void> const& o) const noexcept;
True if not equal to the success type sugar.
Effects: If a valid expression to do so, calls the operator!=
operation on the successful item returning true if not equal. Otherwise returns false.
Throws: Any exception the operator!=
operation might throw.
o
— The success type sugar to compare to.
template <class T>
constexpr bool operator!=(failure_type<T, void> const& o) const noexcept('hidden');
True if not equal to the failure type sugar.
Effects: If a valid expression to do so, calls the operator!=
operation on the failure item returning true if not equal. Otherwise returns false.
Throws: Any exception the operator!=
operation might throw.
o
— The failure type sugar to compare to.
using value_type = R;
The success type.
using error_type = S;
The failure type.
using value_type_if_enabled = typename base::_value_type;
Used to disable in place type construction when value_type
and error_type
are ambiguous.
using error_type_if_enabled = typename base::_error_type;
Used to disable in place type construction when value_type
and error_type
are ambiguous.
template <class T, class U = S, class V = policy::default_policy<T,U,void>>
using rebind = result<T, U, V>;
Used to rebind this result to a different result type.
struct predicate { using base = 'hidden';
<span class="typ dec var fun">template</span> <span class="pun"><</span><span class="typ dec var fun">class</span> <span class="kwd">T</span><span class="pun">></span><span class="typ dec var fun">static</span> <span class="typ dec var fun">constexpr</span> <span class="typ dec var fun">bool</span> <span class="kwd">enable_value_converting_constructor</span> <span class="pun">=</span> <span class="pun">!</span><span class="kwd">std</span><span class="pun">::</span><span class="kwd">is_same</span><span class="pun"><</span><span class="kwd">std</span><span class="pun">::</span><span class="kwd">decay_t</span><span class="pun"><</span><span class="kwd">T</span><span class="pun">></span><span class="pun">,</span> <span class="kwd">result</span><span class="pun">></span><span class="pun">::</span><span class="kwd">value</span> <span class="pun">&&</span> <span class="kwd">base</span><span class="pun">::</span><span class="typ dec var fun">template</span> <span class="kwd">enable_value_converting_constructor</span><span class="pun"><</span><span class="kwd">T</span><span class="pun">></span><span class="pun">;</span> <span class="typ dec var fun">template</span> <span class="pun"><</span><span class="typ dec var fun">class</span> <span class="kwd">T</span><span class="pun">></span><span class="typ dec var fun">static</span> <span class="typ dec var fun">constexpr</span> <span class="typ dec var fun">bool</span> <span class="kwd">enable_error_converting_constructor</span> <span class="pun">=</span> <span class="pun">!</span><span class="kwd">std</span><span class="pun">::</span><span class="kwd">is_same</span><span class="pun"><</span><span class="kwd">std</span><span class="pun">::</span><span class="kwd">decay_t</span><span class="pun"><</span><span class="kwd">T</span><span class="pun">></span><span class="pun">,</span> <span class="kwd">result</span><span class="pun">></span><span class="pun">::</span><span class="kwd">value</span> <span class="pun">&&</span> <span class="kwd">base</span><span class="pun">::</span><span class="typ dec var fun">template</span> <span class="kwd">enable_error_converting_constructor</span><span class="pun"><</span><span class="kwd">T</span><span class="pun">></span><span class="pun">;</span> <span class="typ dec var fun">template</span> <span class="pun"><</span><span class="typ dec var fun">class</span> <span class="kwd">ErrorCondEnum</span><span class="pun">></span><span class="typ dec var fun">static</span> <span class="typ dec var fun">constexpr</span> <span class="typ dec var fun">bool</span> <span class="kwd">enable_error_condition_converting_constructor</span> <span class="pun">=</span> <span class="pun">!</span><span class="kwd">std</span><span class="pun">::</span><span class="kwd">is_same</span><span class="pun"><</span><span class="kwd">std</span><span class="pun">::</span><span class="kwd">decay_t</span><span class="pun"><</span><span class="kwd">ErrorCondEnum</span><span class="pun">></span><span class="pun">,</span> <span class="kwd">result</span><span class="pun">></span><span class="pun">::</span><span class="kwd">value</span> <span class="pun">&&</span> <span class="kwd">base</span><span class="pun">::</span><span class="typ dec var fun">template</span> <span class="kwd">enable_error_condition_converting_constructor</span><span class="pun"><</span><span class="kwd">ErrorCondEnum</span><span class="pun">></span><span class="pun">;</span> <span class="typ dec var fun">template</span> <span class="pun"><</span><span class="typ dec var fun">class</span> <span class="kwd">T</span><span class="pun">,</span> <span class="typ dec var fun">class</span> <span class="kwd">U</span><span class="pun">,</span> <span class="typ dec var fun">class</span> <span class="kwd">V</span><span class="pun">></span><span class="typ dec var fun">static</span> <span class="typ dec var fun">constexpr</span> <span class="typ dec var fun">bool</span> <span class="kwd">enable_compatible_conversion</span> <span class="pun">=</span> <span class="pun">!</span><span class="kwd">std</span><span class="pun">::</span><span class="kwd">is_same</span><span class="pun"><</span><span class="kwd">result</span><span class="pun"><</span><span class="kwd">T</span><span class="pun">,</span> <span class="kwd">U</span><span class="pun">,</span> <span class="kwd">V</span><span class="pun">></span><span class="pun">,</span> <span class="kwd">result</span><span class="pun">></span><span class="pun">::</span><span class="kwd">value</span> <span class="pun">&&</span> <span class="kwd">base</span><span class="pun">::</span><span class="typ dec var fun">template</span> <span class="kwd">enable_compatible_conversion</span><span class="pun"><</span><span class="kwd">T</span><span class="pun">,</span> <span class="kwd">U</span><span class="pun">,</span> <span class="kwd">V</span><span class="pun">></span><span class="pun">;</span> <span class="typ dec var fun">template</span> <span class="pun"><</span><span class="typ dec var fun">class</span><span class="pun">...</span><span class="kwd">Args</span><span class="pun">></span><span class="typ dec var fun">static</span> <span class="typ dec var fun">constexpr</span> <span class="typ dec var fun">bool</span> <span class="kwd">enable_inplace_value_constructor</span> <span class="pun">=</span> <span class="kwd">std</span><span class="pun">::</span><span class="kwd">is_void</span><span class="pun"><</span><span class="kwd">value_type</span><span class="pun">></span><span class="pun">::</span><span class="kwd">value</span> <span class="pun">||</span> <span class="kwd">std</span><span class="pun">::</span><span class="kwd">is_constructible</span><span class="pun"><</span><span class="kwd">value_type</span><span class="pun">,</span> <span class="kwd">Args</span><span class="pun">...</span><span class="pun">></span><span class="pun">::</span><span class="kwd">value</span><span class="pun">;</span> <span class="typ dec var fun">template</span> <span class="pun"><</span><span class="typ dec var fun">class</span><span class="pun">...</span><span class="kwd">Args</span><span class="pun">></span><span class="typ dec var fun">static</span> <span class="typ dec var fun">constexpr</span> <span class="typ dec var fun">bool</span> <span class="kwd">enable_inplace_error_constructor</span> <span class="pun">=</span> <span class="kwd">std</span><span class="pun">::</span><span class="kwd">is_void</span><span class="pun"><</span><span class="kwd">error_type</span><span class="pun">></span><span class="pun">::</span><span class="kwd">value</span> <span class="pun">||</span> <span class="kwd">std</span><span class="pun">::</span><span class="kwd">is_constructible</span><span class="pun"><</span><span class="kwd">error_type</span><span class="pun">,</span> <span class="kwd">Args</span><span class="pun">...</span><span class="pun">></span><span class="pun">::</span><span class="kwd">value</span><span class="pun">;</span> <span class="typ dec var fun">template</span> <span class="pun"><</span><span class="typ dec var fun">class</span><span class="pun">...</span><span class="kwd">Args</span><span class="pun">></span><span class="typ dec var fun">static</span> <span class="typ dec var fun">constexpr</span> <span class="typ dec var fun">bool</span> <span class="kwd">enable_inplace_value_error_constructor</span> <span class="pun">=</span> <span class="kwd">base</span><span class="pun">::</span><span class="typ dec var fun">template</span> <span class="kwd">enable_inplace_value_error_constructor</span><span class="pun"><</span><span class="kwd">Args</span><span class="pun">...</span><span class="pun">></span><span class="pun">;</span> <span class="kwd">template</span> <span class="pun"><</span><span class="kwd">class</span> <span class="pun">...</span> <span class="typ dec var fun">Args</span><span class="pun">></span> <span class="kwd">using</span> <span class="typ dec var fun">choose_inplace_value_error_constructor</span> <span class="pun">=</span> typename base::choose_inplace_value_error_constructor<Args...><span class="pun">;</span>
};
Requirement predicates for result.
template <class T>static constexpr bool enable_value_converting_constructor = !std::is_same<std::decay_t<T>, result>::value && base::template enable_value_converting_constructor<T>;
Predicate for the value converting constructor to be available.
template <class T>static constexpr bool enable_error_converting_constructor = !std::is_same<std::decay_t<T>, result>::value && base::template enable_error_converting_constructor<T>;
Predicate for the error converting constructor to be available.
template <class ErrorCondEnum>static constexpr bool enable_error_condition_converting_constructor = !std::is_same<std::decay_t<ErrorCondEnum>, result>::value && base::template enable_error_condition_converting_constructor<ErrorCondEnum>;
Predicate for the error condition converting constructor to be available.
template <class T, class U, class V>static constexpr bool enable_compatible_conversion = !std::is_same<result<T, U, V>, result>::value && base::template enable_compatible_conversion<T, U, V>;
Predicate for the converting copy constructor from a compatible input to be available.
template <class...Args>static constexpr bool enable_inplace_value_constructor = std::is_void<value_type>::value || std::is_constructible<value_type, Args...>::value;
Predicate for the inplace construction of value to be available.
template <class...Args>static constexpr bool enable_inplace_error_constructor = std::is_void<error_type>::value || std::is_constructible<error_type, Args...>::value;
Predicate for the inplace construction of error to be available.
result() = delete;
Default construction is not permitted.
result(result<R, S, NoValuePolicy>&&) = default;
Move construction available if value_type
and error_type
implement it.
result(const result<R, S, NoValuePolicy>&) = default;
Copy construction available if value_type
and error_type
implement it.
result<R, S, NoValuePolicy>& operator=(result<R, S, NoValuePolicy>&&) = default;
Move assignment available if value_type
and error_type
implement it.
result<R, S, NoValuePolicy>& operator=(const result<R, S, NoValuePolicy>&) = default;
Copy assignment available if value_type
and error_type
implement it.
template <class T>
constexpr result(T&& t) noexcept('hidden');
Implicit converting constructor to a successful result.
Effects: Initialises the result with a value_type
.
Requires: Type T is implicitly constructible to value_type
, is not implicitly constructible to error_type
, and is not result<R, S>
and not in_place_type<>
.
Throws: Any exception the construction of value_type(T)
might throw.
t
— The value from which to initialise thevalue_type
.
template <class T>
constexpr result(T&& t) noexcept('hidden');
Implicit converting constructor to a failure result.
Effects: Initialises the result with a error_type
.
Requires: Type T is implicitly constructible to error_type
, is not implicitly constructible to value_type
, and is not result<R, S>
and not in_place_type<>
.
Throws: Any exception the construction of error_type(T)
might throw.
t
— The value from which to initialise theerror_type
.
template <class ErrorCondEnum>
constexpr result(ErrorCondEnum&& t) noexcept('hidden');
Implicit special error condition converting constructor to a failure result.
Effects: Initialises the result with a error_type
constructed via make_error_code(t)
.
Requires: std::is_error_condition_enum<ErrorCondEnum>
must be true, ErrorCondEnum
is not implicitly constructible to value_type
nor error_type
, and is not result<R, S>
and not in_place_type<>
; Finally, the expression error_type(make_error_code(ErrorCondEnum()))
must be valid.
Throws: Any exception the construction of error_type(make_error_code(t))
might throw.
t
— The error condition from which to initialise theerror_type
.
template <class T>
constexpr result(T&& o);
Explicit converting constructor from a compatible ValueOrError
type.
Effects: Initialises the result with the contents of the compatible input.
Requires: That convert::value_or_error<result, std::decay_t<T>>{}(std::forward<T>(o))
be available. The default implementation will consume T
’s matching the ValueOrError
concept type. ValueOrError
concept matches any type with a value_type
, an error_type
, a .value()
, an .error()
and a .has_value()
.
o
— The input for which aconvert::value_or_error<result, std::decay_t<T>>{}(std::forward<T>(o))
is available.
template <class T, class U, class V>
constexpr result(result<T, U, V> const& o) noexcept('hidden');
Explicit converting copy constructor from a compatible result type.
Effects: Initialises the result with a copy of the compatible result.
Requires: Both result’s value_type
and error_type
need to be constructible, or the source can be void
.
Throws: Any exception the construction of value_type(T)
and error_type(U)
might throw.
o
— The compatible result.
template <class T, class U, class V>
constexpr result(result<T, U, V>&& o) noexcept('hidden');
Explicit converting move constructor from a compatible result type.
Effects: Initialises the result with a move of the compatible result.
Requires: Both result’s value_type
and error_type
need to be constructible, or the source can be void
.
Throws: Any exception the construction of value_type(T)
and error_type(U)
might throw.
o
— The compatible result.
template <class ... Args>
constexpr result(in_place_type_t<outcome_v2_xxx::result::value_type_if_enabled> _, Args &&... args) noexcept('hidden');
Explicit inplace constructor to a successful result.
Effects: Initialises the result with a value_type
.
Requires: value_type
is void or Args...
are constructible to value_type
.
Throws: Any exception the construction of value_type(Args...)
might throw.
_
— Tag type to indicate we are doing in place construction ofvalue_type
.args
— Arguments with which to in place construct.
template <class U, class ... Args>
constexpr result(in_place_type_t<outcome_v2_xxx::result::value_type_if_enabled> _, std::initializer_list<U> il, Args &&... args) noexcept('hidden');
Explicit inplace constructor to a successful result.
Effects: Initialises the result with a value_type
.
Requires: The initializer list + Args...
are constructible to value_type
.
Throws: Any exception the construction of value_type(il, Args...)
might throw.
_
— Tag type to indicate we are doing in place construction ofvalue_type
.il
— An initializer list with which to in place construct.args
— Arguments with which to in place construct.
template <class ... Args>
constexpr result(in_place_type_t<outcome_v2_xxx::result::error_type_if_enabled> _, Args &&... args) noexcept('hidden');
Explicit inplace constructor to a failure result.
Effects: Initialises the result with a error_type
.
Requires: error_type
is void or Args...
are constructible to error_type
.
Throws: Any exception the construction of error_type(Args...)
might throw.
_
— Tag type to indicate we are doing in place construction oferror_type
.args
— Arguments with which to in place construct.
template <class U, class ... Args>
constexpr result(in_place_type_t<outcome_v2_xxx::result::error_type_if_enabled> _, std::initializer_list<U> il, Args &&... args) noexcept('hidden');
Explicit inplace constructor to a failure result.
Effects: Initialises the result with a error_type
.
Requires: The initializer list + Args...
are constructible to error_type
.
Throws: Any exception the construction of error_type(il, Args...)
might throw.
_
— Tag type to indicate we are doing in place construction oferror_type
.il
— An initializer list with which to in place construct.args
— Arguments with which to in place construct.
template <class A1, class A2, class ... Args>
constexpr result(A1&& a1, A2&& a2, Args &&... args) noexcept('hidden');
Implicit inplace constructor to successful or failure result.
Effects: Calls the appropriate in_place_type_t<...>
constructor depending on constructibility of args.
Requires: That the args can construct exactly one of value_type
or error_type
.
Throws: Any exception the in_place_type_t<...>
constructor might throw.
args
— Arguments with which to in place construct.
constexpr result(success_type<void> const& o) noexcept('hidden');
Implicit tagged constructor of a successful result.
Effects: Initialises the result with a default constructed success type.
Requires: value_type
to be default constructible, or void
.
Throws: Any exception the construction of value_type()
might throw.
o
— The compatible success type sugar.
template <class T>
constexpr result(success_type<T> const& o) noexcept('hidden');
Implicit tagged constructor of a successful result.
Effects: Initialises the result with a copy of the value in the type sugar.
Requires: Both result and success’ value_type
need to be constructible, or the source can be void
.
Throws: Any exception the construction of value_type(T)
might throw.
o
— The compatible success type sugar.
template <class T>
constexpr result(success_type<T>&& o) noexcept('hidden');
Implicit tagged constructor of a successful result.
Effects: Initialises the result with a move of the value in the type sugar.
Requires: Both result and success’ value_type
need to be constructible. The source cannot be void
.
Throws: Any exception the construction of value_type(T)
might throw.
o
— The compatible success type sugar.
template <class T>
constexpr result(failure_type<T> const& o) noexcept('hidden');
Implicit tagged constructor of a failure result.
Effects: Initialises the result with a copy of the error in the type sugar.
Requires: Both result and failure’s error_type
need to be constructible, or the source can be void
.
Throws: Any exception the construction of error_type(T)
might throw.
o
— The compatible failure type sugar.
template <class T>
constexpr result(failure_type<T>&& o) noexcept('hidden');
Implicit tagged constructor of a failure result.
Effects: Initialises the result with a move of the error in the type sugar.
Requires: Both result and failure’s error_type
need to be constructible, or the source can be void
.
Throws: Any exception the construction of error_type(T)
might throw.
o
— The compatible failure type sugar.
void swap(result<R, S, NoValuePolicy>& o) noexcept('hidden');
Swaps this result with another result
Effects: Any R
and/or S
is swapped along with the metadata tracking them.
auto as_failure() const &;
Returns this result as a failure_type
with any errored state copied.
Requires: This result to have a failed state, else whatever assume_error()
would do.
auto as_failure() &&;
Returns this result as a failure_type
with any errored state moved.
Requires: This result to have a failed state, else whatever assume_error()
would do.
template <class R, class S, class P>
void swap(result<R, S, P>& a, result<R, S, P>& b) noexcept('hidden');
Specialise swap for result.
Effects: Calls a.swap(b)
.
template <class R, class S = std::error_code>
using unchecked = result<R, S, policy::all_narrow>;
An “unchecked” edition of result<T, E>
which does no special handling of specific E
types at all.
Attempting to access T
when there is an E
results in nothing happening at all, it is treated with a narrow contract (i.e. undefined behaviour).
template <class R, class S = std::error_code>
using checked = result<R, S, policy::throw_bad_result_access<S>>;
A “checked” edition of result<T, E>
which does no special handling of specific E
types at all.
Attempting to access T
when there is an E
results in bad_result_access<E>
being thrown. Nothing else.
Note that this approximates the proposed expected<T, E>
up for standardisation, see the FAQ for more detail.