63 lines
3.6 KiB
HTML
63 lines
3.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>is_move_bitcopying<T> - Boost.Outcome documentation</title>
|
|
<link rel="stylesheet" href="../../css/boost.css" type="text/css">
|
|
<meta name="generator" content="Hugo 0.52 with Boostdoc theme">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
|
|
|
|
<link rel="icon" href="../../images/favicon.ico" type="image/ico"/>
|
|
<body><div class="spirit-nav">
|
|
<a accesskey="p" href="../../reference/traits/is_failure_type.html"><img src="../../images/prev.png" alt="Prev"></a>
|
|
<a accesskey="u" href="../../reference/traits.html"><img src="../../images/up.png" alt="Up"></a>
|
|
<a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../reference/traits/is_success_type.html"><img src="../../images/next.png" alt="Next"></a></div><div id="content">
|
|
<div class="titlepage"><div><div><h1 style="clear: both"><code>is_move_bitcopying<T></code></h1></div></div></div>
|
|
<p>A customisable integral constant type true for <code>T</code> types which are move bitcopying
|
|
safe. As per <a href="https://wg21.link/P1029">P1029 move bitcopying</a>, these are types for
|
|
which:</p>
|
|
|
|
<ol>
|
|
<li>There is an inline, constexpr-available, default constructor.</li>
|
|
<li>The move constructor has side effects equivalent to <code>memcpy</code> of source to destination,
|
|
followed by a <code>memcpy</code> of a default constructed instance to source.</li>
|
|
<li>That the destruction of a default constructed instance has no visible
|
|
side effects.</li>
|
|
</ol>
|
|
|
|
<p>This implies that if you move from a bit copying type, you need not call its
|
|
destructor, even if that is a virtual destructor.</p>
|
|
|
|
<p>If you opt your types into this trait, Outcome will track moved-from state and
|
|
not call the destructor for your type on moved-from instances. Obviously enough
|
|
this is, in current C++ standards, undefined behaviour. However it very
|
|
significantly improves the quality of codegen during inlining.</p>
|
|
|
|
<p><em>Overridable</em>: By template specialisation into the <code>trait</code> namespace.</p>
|
|
|
|
<p><em>Default</em>: False. Default specialisations exist for:</p>
|
|
|
|
<ul>
|
|
<li><code><boost/outcome/experimental/status_result.hpp></code>
|
|
|
|
<ul>
|
|
<li>True for <code>BOOST_OUTCOME_SYSTEM_ERROR2_NAMESPACE::status_code<DomainType></code> if trait
|
|
<code>BOOST_OUTCOME_SYSTEM_ERROR2_NAMESPACE::traits::is_move_bitcopying<BOOST_OUTCOME_SYSTEM_ERROR2_NAMESPACE::status_code<DomainType>>::value</code>
|
|
is true.</li>
|
|
<li>True for <code>BOOST_OUTCOME_SYSTEM_ERROR2_NAMESPACE::errored_status_code<DomainType></code> if trait
|
|
<code>BOOST_OUTCOME_SYSTEM_ERROR2_NAMESPACE::traits::is_move_bitcopying<BOOST_OUTCOME_SYSTEM_ERROR2_NAMESPACE::errored_status_code<DomainType>>::value</code>
|
|
is true.</li>
|
|
</ul></li>
|
|
</ul>
|
|
|
|
<p><em>Namespace</em>: <code>BOOST_OUTCOME_V2_NAMESPACE::trait</code></p>
|
|
|
|
<p><em>Header</em>: <code><boost/outcome/trait.hpp></code></p>
|
|
|
|
|
|
</div><p><small>Last revised: December 17, 2020 at 11:27:06 UTC</small></p>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="../../reference/traits/is_failure_type.html"><img src="../../images/prev.png" alt="Prev"></a>
|
|
<a accesskey="u" href="../../reference/traits.html"><img src="../../images/up.png" alt="Up"></a>
|
|
<a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../reference/traits/is_success_type.html"><img src="../../images/next.png" alt="Next"></a></div></body>
|
|
</html>
|