代码拉取完成,页面将自动刷新
<!-- HTML header for doxygen 1.8.16-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>memory: allocator_deallocator< Type, RawAllocator > Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">memory
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="main-nav">
<ul class="sm sm-dox" id="main-menu">
<li><a href="index.html">Main Page</a></li>
<li><a href="md_doc_tutorial.html">Tutorial</a></li>
<li><a href="namespacefoonathan_1_1memory.html">Index</a></li>
<li><a href="files.html">Files</a></li>
</ul>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacefoonathan.html">foonathan</a></li><li class="navelem"><a class="el" href="namespacefoonathan_1_1memory.html">memory</a></li><li class="navelem"><a class="el" href="classfoonathan_1_1memory_1_1allocator__deallocator.html">allocator_deallocator</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Typedefs</a> |
<a href="#pub-methods">Member Functions</a> </div>
<div class="headertitle">
<div class="title">allocator_deallocator< Type, RawAllocator > Class Template Reference<div class="ingroups"><a class="el" href="group__adapter.html">Adapters and Wrappers</a></div></div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template<typename Type, class RawAllocator><br />
class foonathan::memory::allocator_deallocator< Type, RawAllocator ></h3>
<p>A deleter class that deallocates the memory through a specified <a href="md_doc_concepts.html#concept_rawallocator">RawAllocator</a>. </p>
<p>It deallocates memory for a specified type but does not call its destructors. </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a7d9065faac8186bbc0793460883edb05"><td class="memItemLeft" align="right" valign="top"><a id="a7d9065faac8186bbc0793460883edb05"></a>
using </td><td class="memItemRight" valign="bottom"><b>allocator_type</b> = typename <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a>< RawAllocator >::allocator_type</td></tr>
<tr class="separator:a7d9065faac8186bbc0793460883edb05"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af0f70ef64d23e2379bacb63968e68b45"><td class="memItemLeft" align="right" valign="top"><a id="af0f70ef64d23e2379bacb63968e68b45"></a>
using </td><td class="memItemRight" valign="bottom"><b>value_type</b> = Type</td></tr>
<tr class="separator:af0f70ef64d23e2379bacb63968e68b45"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Member Functions</h2></td></tr>
<tr class="memitem:ad9592c58f04416176c49bf31254213cb"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1allocator__deallocator.html#ad9592c58f04416176c49bf31254213cb">allocator_deallocator</a> () noexcept=default</td></tr>
<tr class="separator:ad9592c58f04416176c49bf31254213cb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a447b730468d9066ac81c69629ec4564e"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1allocator__deallocator.html#a447b730468d9066ac81c69629ec4564e">allocator_deallocator</a> (<a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a>< RawAllocator > alloc) noexcept</td></tr>
<tr class="separator:a447b730468d9066ac81c69629ec4564e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a126343d6121aa750c8cd4473cb0a8f71"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1allocator__deallocator.html#a126343d6121aa750c8cd4473cb0a8f71">operator()</a> (value_type *pointer) noexcept</td></tr>
<tr class="separator:a126343d6121aa750c8cd4473cb0a8f71"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3cfad7a69c215de0ed8954f179fffb61"><td class="memItemLeft" align="right" valign="top">auto </td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1allocator__deallocator.html#a3cfad7a69c215de0ed8954f179fffb61">get_allocator</a> () const noexcept -> decltype(std::declval< <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a>< allocator_type >>().get_allocator())</td></tr>
<tr class="separator:a3cfad7a69c215de0ed8954f179fffb61"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Constructors</h2>
<a id="ad9592c58f04416176c49bf31254213cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9592c58f04416176c49bf31254213cb">◆ </a></span>allocator_deallocator() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classfoonathan_1_1memory_1_1allocator__deallocator.html">allocator_deallocator</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Effects:</dt><dd>Creates it without any associated allocator. The deallocator must not be used if that is the case. </dd></dl>
<dl class="section user"><dt>Notes:</dt><dd>This functions is useful if you have want to create an empty smart pointer without giving it an allocator. </dd></dl>
</div>
</div>
<a id="a447b730468d9066ac81c69629ec4564e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a447b730468d9066ac81c69629ec4564e">◆ </a></span>allocator_deallocator() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classfoonathan_1_1memory_1_1allocator__deallocator.html">allocator_deallocator</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a>< RawAllocator > </td>
<td class="paramname"><em>alloc</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Effects:</dt><dd>Creates it by passing it an <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a>. It will store the reference to it and uses the referenced allocator object for the deallocation. </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Functions</h2>
<a id="a126343d6121aa750c8cd4473cb0a8f71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a126343d6121aa750c8cd4473cb0a8f71">◆ </a></span>operator()()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void operator() </td>
<td>(</td>
<td class="paramtype">value_type * </td>
<td class="paramname"><em>pointer</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Effects:</dt><dd>Deallocates the memory given to it. Calls <code>deallocate_node</code>(pointer, sizeof(value_type), alignof(value_type)) on the referenced allocator object. </dd></dl>
<dl class="section user"><dt>Requires:</dt><dd>The deallocator must not have been created by the default constructor. </dd></dl>
</div>
</div>
<a id="a3cfad7a69c215de0ed8954f179fffb61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cfad7a69c215de0ed8954f179fffb61">◆ </a></span>get_allocator()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto get_allocator </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const -> decltype(std::declval<<a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a><allocator_type>>().get_allocator())
</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Returns:</dt><dd>The reference to the allocator. It has the same type as the call to <a class="el" href="classfoonathan_1_1memory_1_1allocator__storage.html#ad0e22f6844a93ca183a896dc1e863a50">allocator_reference::get_allocator()</a>. </dd></dl>
<dl class="section user"><dt>Requires:</dt><dd>The deallocator must not be created by the default constructor. </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.16-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。