1 Star 0 Fork 0

mobangjack / memory

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
classfoonathan_1_1memory_1_1std__allocator.html 41.34 KB
一键复制 编辑 原始数据 按行查看 历史
Jonathan Müller 提交于 2020-05-05 17:04 . Update documentation
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
<!-- 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: std_allocator&lt; T, RawAllocator &gt; 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_1std__allocator.html">std_allocator</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Typedefs</a> &#124;
<a href="#pub-methods">Member Functions</a> &#124;
<a href="#related">Related Functions</a> </div>
<div class="headertitle">
<div class="title">std_allocator&lt; T, RawAllocator &gt; 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&lt;typename T, class RawAllocator&gt;<br />
class foonathan::memory::std_allocator&lt; T, RawAllocator &gt;</h3>
<p>Wraps a <a href="md_doc_concepts.html#concept_rawallocator">RawAllocator</a> and makes it a "normal" <code>Allocator</code>. </p>
<p>It allows using a <code>RawAllocator</code> anywhere a <code>Allocator</code> is required. </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:afb9ded5f49336ae503bb9f2035ea902b"><td class="memItemLeft" align="right" valign="top"><a id="afb9ded5f49336ae503bb9f2035ea902b"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>value_type</b> = T</td></tr>
<tr class="separator:afb9ded5f49336ae503bb9f2035ea902b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab088798d28525c0befe3c707b95c5bc2"><td class="memItemLeft" align="right" valign="top"><a id="ab088798d28525c0befe3c707b95c5bc2"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>pointer</b> = T *</td></tr>
<tr class="separator:ab088798d28525c0befe3c707b95c5bc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb8303778a4db95b65080fb533378d32"><td class="memItemLeft" align="right" valign="top"><a id="aeb8303778a4db95b65080fb533378d32"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>const_pointer</b> = const T *</td></tr>
<tr class="separator:aeb8303778a4db95b65080fb533378d32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c5a1541ecf7ad17925583cf6abd2c65"><td class="memItemLeft" align="right" valign="top"><a id="a0c5a1541ecf7ad17925583cf6abd2c65"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>reference</b> = T &amp;</td></tr>
<tr class="separator:a0c5a1541ecf7ad17925583cf6abd2c65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac98a2432df95afe641c3847268f579e8"><td class="memItemLeft" align="right" valign="top"><a id="ac98a2432df95afe641c3847268f579e8"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>const_reference</b> = const T &amp;</td></tr>
<tr class="separator:ac98a2432df95afe641c3847268f579e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af38ce1af42d538f410180c265518d4f0"><td class="memItemLeft" align="right" valign="top"><a id="af38ce1af42d538f410180c265518d4f0"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>size_type</b> = std::size_t</td></tr>
<tr class="separator:af38ce1af42d538f410180c265518d4f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace405568d0b2f3fad4990044252c7732"><td class="memItemLeft" align="right" valign="top"><a id="ace405568d0b2f3fad4990044252c7732"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>difference_type</b> = std::ptrdiff_t</td></tr>
<tr class="separator:ace405568d0b2f3fad4990044252c7732"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa08cb81fe3d83941bb86a9733d4d81ef"><td class="memItemLeft" align="right" valign="top"><a id="aa08cb81fe3d83941bb86a9733d4d81ef"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>propagate_on_container_swap</b> = typename prop_traits::propagate_on_container_swap</td></tr>
<tr class="separator:aa08cb81fe3d83941bb86a9733d4d81ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27f5b79011bda7be201ba51be6a016b0"><td class="memItemLeft" align="right" valign="top"><a id="a27f5b79011bda7be201ba51be6a016b0"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>propagate_on_container_move_assignment</b> = typename prop_traits::propagate_on_container_move_assignment</td></tr>
<tr class="separator:a27f5b79011bda7be201ba51be6a016b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a918df2db5f784590cdd4687aaa4354df"><td class="memItemLeft" align="right" valign="top"><a id="a918df2db5f784590cdd4687aaa4354df"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>propagate_on_container_copy_assignment</b> = typename prop_traits::propagate_on_container_copy_assignment</td></tr>
<tr class="separator:a918df2db5f784590cdd4687aaa4354df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5d32e7aff2b04242040cc08f3c9467e"><td class="memItemLeft" align="right" valign="top"><a id="ae5d32e7aff2b04242040cc08f3c9467e"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>allocator_type</b> = typename alloc_reference::allocator_type</td></tr>
<tr class="separator:ae5d32e7aff2b04242040cc08f3c9467e"><td class="memSeparator" colspan="2">&#160;</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:a9b3c34b4765ab84278e5c2b4a023ffb7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a9b3c34b4765ab84278e5c2b4a023ffb7">std_allocator</a> () noexcept</td></tr>
<tr class="separator:a9b3c34b4765ab84278e5c2b4a023ffb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c5dbc0f9361001987b9562b092e4a27"><td class="memTemplParams" colspan="2">template&lt;class RawAlloc , FOONATHAN_REQUIRES((!std::is_base_of&lt; std_allocator, RawAlloc &gt;::value)) &gt; </td></tr>
<tr class="memitem:a8c5dbc0f9361001987b9562b092e4a27"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a8c5dbc0f9361001987b9562b092e4a27">std_allocator</a> (RawAlloc &amp;alloc, FOONATHAN_SFINAE(<a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">alloc_reference</a>(alloc))) noexcept</td></tr>
<tr class="separator:a8c5dbc0f9361001987b9562b092e4a27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43eb7a884b85d01d88681510c61b0b25"><td class="memTemplParams" colspan="2">template&lt;class RawAlloc , FOONATHAN_REQUIRES((!std::is_base_of&lt; std_allocator, RawAlloc &gt;::value)) &gt; </td></tr>
<tr class="memitem:a43eb7a884b85d01d88681510c61b0b25"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a43eb7a884b85d01d88681510c61b0b25">std_allocator</a> (const RawAlloc &amp;alloc, FOONATHAN_SFINAE(<a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">alloc_reference</a>(alloc))) noexcept</td></tr>
<tr class="separator:a43eb7a884b85d01d88681510c61b0b25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ef0e0a56669c5b53a0a196d51964298"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a5ef0e0a56669c5b53a0a196d51964298">std_allocator</a> (const <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">alloc_reference</a> &amp;alloc) noexcept</td></tr>
<tr class="separator:a5ef0e0a56669c5b53a0a196d51964298"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89e097c83e80cc13876d167bd779e720"><td class="memTemplParams" colspan="2">template&lt;class StoragePolicy , class OtherMut &gt; </td></tr>
<tr class="memitem:a89e097c83e80cc13876d167bd779e720"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a89e097c83e80cc13876d167bd779e720">std_allocator</a> (const <a class="el" href="classfoonathan_1_1memory_1_1allocator__storage.html">allocator_storage</a>&lt; StoragePolicy, OtherMut &gt; &amp;)=delete</td></tr>
<tr class="separator:a89e097c83e80cc13876d167bd779e720"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87b6385dfe32de17cdb0ea670932dc93"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; T, RawAllocator &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a87b6385dfe32de17cdb0ea670932dc93">select_on_container_copy_construction</a> () const</td></tr>
<tr class="separator:a87b6385dfe32de17cdb0ea670932dc93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d7f043644ba31be0c9f4e1928ec3f2f"><td class="memItemLeft" align="right" valign="top">pointer&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a6d7f043644ba31be0c9f4e1928ec3f2f">allocate</a> (size_type n, void *=nullptr)</td></tr>
<tr class="separator:a6d7f043644ba31be0c9f4e1928ec3f2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32360c6e0b0b34e8d91a0d0f7767b6ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a32360c6e0b0b34e8d91a0d0f7767b6ef">deallocate</a> (pointer p, size_type n) noexcept</td></tr>
<tr class="separator:a32360c6e0b0b34e8d91a0d0f7767b6ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac91dc09e66922343727d11af1fce04b9"><td class="memTemplParams" colspan="2">template&lt;typename U , typename... Args&gt; </td></tr>
<tr class="memitem:ac91dc09e66922343727d11af1fce04b9"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#ac91dc09e66922343727d11af1fce04b9">construct</a> (U *p, Args &amp;&amp;... args)</td></tr>
<tr class="separator:ac91dc09e66922343727d11af1fce04b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa90e9eae27307478558886c72669d73d"><td class="memTemplParams" colspan="2">template&lt;typename U &gt; </td></tr>
<tr class="memitem:aa90e9eae27307478558886c72669d73d"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#aa90e9eae27307478558886c72669d73d">destroy</a> (U *p) noexcept</td></tr>
<tr class="separator:aa90e9eae27307478558886c72669d73d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2a85e463df4e95c1bf051cfb8237805"><td class="memItemLeft" align="right" valign="top">size_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#ac2a85e463df4e95c1bf051cfb8237805">max_size</a> () const noexcept</td></tr>
<tr class="separator:ac2a85e463df4e95c1bf051cfb8237805"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a775d113550b16d70ae7568c934ea099c"><td class="memTemplParams" colspan="2">template&lt;typename U &gt; </td></tr>
<tr class="memitem:a775d113550b16d70ae7568c934ea099c"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a775d113550b16d70ae7568c934ea099c">std_allocator</a> (const <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; U, RawAllocator &gt; &amp;alloc) noexcept</td></tr>
<tr class="separator:a775d113550b16d70ae7568c934ea099c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5002254a58b6fb0347d2a9d4c36a36fe"><td class="memTemplParams" colspan="2">template&lt;typename U &gt; </td></tr>
<tr class="memitem:a5002254a58b6fb0347d2a9d4c36a36fe"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a5002254a58b6fb0347d2a9d4c36a36fe">std_allocator</a> (<a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; U, RawAllocator &gt; &amp;alloc) noexcept</td></tr>
<tr class="separator:a5002254a58b6fb0347d2a9d4c36a36fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a515787687858e1051c3c60131d9849b7"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a515787687858e1051c3c60131d9849b7">get_allocator</a> () noexcept -&gt; decltype(std::declval&lt; <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">alloc_reference</a> &gt;().get_allocator())</td></tr>
<tr class="separator:a515787687858e1051c3c60131d9849b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecc6ab452fa445dffbe266554beb7e5a"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#aecc6ab452fa445dffbe266554beb7e5a">get_allocator</a> () const noexcept -&gt; decltype(std::declval&lt; const <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">alloc_reference</a> &gt;().get_allocator())</td></tr>
<tr class="separator:aecc6ab452fa445dffbe266554beb7e5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="related"></a>
Related Functions</h2></td></tr>
<tr class="memitem:ac15a6de6bb77fc58b63b3d387656b61d"><td class="memTemplParams" colspan="2">template&lt;typename T , typename U , class Impl &gt; </td></tr>
<tr class="memitem:ac15a6de6bb77fc58b63b3d387656b61d"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#ac15a6de6bb77fc58b63b3d387656b61d">operator==</a> (const <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; T, Impl &gt; &amp;lhs, const <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; U, Impl &gt; &amp;rhs) noexcept</td></tr>
<tr class="separator:ac15a6de6bb77fc58b63b3d387656b61d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade728d2962d0d3f292e4286f666044cd"><td class="memTemplParams" colspan="2">template&lt;typename T , typename U , class Impl &gt; </td></tr>
<tr class="memitem:ade728d2962d0d3f292e4286f666044cd"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#ade728d2962d0d3f292e4286f666044cd">operator!=</a> (const <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; T, Impl &gt; &amp;lhs, const <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; U, Impl &gt; &amp;rhs) noexcept</td></tr>
<tr class="separator:ade728d2962d0d3f292e4286f666044cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4bb35bfde10edb491e593b1938f1614"><td class="memTemplParams" colspan="2">template&lt;typename T , class RawAllocator &gt; </td></tr>
<tr class="memitem:ad4bb35bfde10edb491e593b1938f1614"><td class="memTemplItemLeft" align="right" valign="top">auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#ad4bb35bfde10edb491e593b1938f1614">make_std_allocator</a> (RawAllocator &amp;&amp;allocator) noexcept -&gt; <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; T, typename std::decay&lt; RawAllocator &gt;::type &gt;</td></tr>
<tr class="separator:ad4bb35bfde10edb491e593b1938f1614"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructors</h2>
<a id="a9b3c34b4765ab84278e5c2b4a023ffb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b3c34b4765ab84278e5c2b4a023ffb7">&#9670;&nbsp;</a></span>std_allocator() <span class="overload">[1/7]</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_1std__allocator.html">std_allocator</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">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Effects:</dt><dd>Default constructs it by storing a default constructed, stateless <code>RawAllocator</code> inside the reference. </dd></dl>
<dl class="section user"><dt>Requires:</dt><dd>The <code>RawAllocator</code> type is stateless, otherwise the body of this function will not compile. </dd></dl>
</div>
</div>
<a id="a8c5dbc0f9361001987b9562b092e4a27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c5dbc0f9361001987b9562b092e4a27">&#9670;&nbsp;</a></span>std_allocator() <span class="overload">[2/7]</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_1std__allocator.html">std_allocator</a> </td>
<td>(</td>
<td class="paramtype">RawAlloc &amp;&#160;</td>
<td class="paramname"><em>alloc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FOONATHAN_SFINAE(<a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">alloc_reference</a>(alloc))&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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 from a reference to a <code>RawAllocator</code>. It will store an <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a> to it. </dd></dl>
<dl class="section user"><dt>Requires:</dt><dd>The expression <code>allocator_reference&lt;RawAllocator&gt;(alloc)</code> is well-formed, that is either <code>RawAlloc</code> is the same as <code>RawAllocator</code> or <code>RawAllocator</code> is the tag type <a class="el" href="structfoonathan_1_1memory_1_1any__allocator.html">any_allocator</a>. If the requirement is not fulfilled this function does not participate in overload resolution. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>The caller has to ensure that the lifetime of the <code>RawAllocator</code> is at least as long as the lifetime of this <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a> object. </dd></dl>
</div>
</div>
<a id="a43eb7a884b85d01d88681510c61b0b25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43eb7a884b85d01d88681510c61b0b25">&#9670;&nbsp;</a></span>std_allocator() <span class="overload">[3/7]</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_1std__allocator.html">std_allocator</a> </td>
<td>(</td>
<td class="paramtype">const RawAlloc &amp;&#160;</td>
<td class="paramname"><em>alloc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FOONATHAN_SFINAE(<a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">alloc_reference</a>(alloc))&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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 from a stateless, temporary <code>RawAllocator</code> object. It will not store a reference but create it on the fly. </dd></dl>
<dl class="section user"><dt>Requires:</dt><dd>The <code>RawAllocator</code> is stateless and the expression <code>allocator_reference&lt;RawAllocator&gt;(alloc)</code> is well-formed as above, otherwise this function does not participate in overload resolution. </dd></dl>
</div>
</div>
<a id="a5ef0e0a56669c5b53a0a196d51964298"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ef0e0a56669c5b53a0a196d51964298">&#9670;&nbsp;</a></span>std_allocator() <span class="overload">[4/7]</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_1std__allocator.html">std_allocator</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">alloc_reference</a> &amp;&#160;</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 from another <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a> using the same allocator type. </dd></dl>
</div>
</div>
<a id="a89e097c83e80cc13876d167bd779e720"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89e097c83e80cc13876d167bd779e720">&#9670;&nbsp;</a></span>std_allocator() <span class="overload">[5/7]</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_1std__allocator.html">std_allocator</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classfoonathan_1_1memory_1_1allocator__storage.html">allocator_storage</a>&lt; StoragePolicy, OtherMut &gt; &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Implicit conversion from any other <a class="el" href="classfoonathan_1_1memory_1_1allocator__storage.html">allocator_storage</a> is forbidden to prevent accidentally wrapping another <a class="el" href="classfoonathan_1_1memory_1_1allocator__storage.html">allocator_storage</a> inside a <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a>. </p>
</div>
</div>
<a id="a775d113550b16d70ae7568c934ea099c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a775d113550b16d70ae7568c934ea099c">&#9670;&nbsp;</a></span>std_allocator() <span class="overload">[6/7]</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_1std__allocator.html">std_allocator</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; U, RawAllocator &gt; &amp;&#160;</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 from another <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a> allocating a different type. This is required by the <code>Allcoator</code> concept and simply takes the same <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a>. </dd></dl>
</div>
</div>
<a id="a5002254a58b6fb0347d2a9d4c36a36fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5002254a58b6fb0347d2a9d4c36a36fe">&#9670;&nbsp;</a></span>std_allocator() <span class="overload">[7/7]</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_1std__allocator.html">std_allocator</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; U, RawAllocator &gt; &amp;&#160;</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 from another <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a> allocating a different type. This is required by the <code>Allcoator</code> concept and simply takes the same <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">allocator_reference</a>. </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Functions</h2>
<a id="a87b6385dfe32de17cdb0ea670932dc93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87b6385dfe32de17cdb0ea670932dc93">&#9670;&nbsp;</a></span>select_on_container_copy_construction()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt;T, RawAllocator&gt; select_on_container_copy_construction </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Returns:</dt><dd>A copy of the allocator. This is required by the <code>Allocator</code> concept and forwards to the <a class="el" href="structfoonathan_1_1memory_1_1propagation__traits.html">propagation_traits</a>. </dd></dl>
</div>
</div>
<a id="a6d7f043644ba31be0c9f4e1928ec3f2f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d7f043644ba31be0c9f4e1928ec3f2f">&#9670;&nbsp;</a></span>allocate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">pointer allocate </td>
<td>(</td>
<td class="paramtype">size_type&#160;</td>
<td class="paramname"><em>n</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"> = <code>nullptr</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Effects:</dt><dd>Allocates memory using the underlying <a href="md_doc_concepts.html#concept_rawallocator">RawAllocator</a>. If <code>n</code> is <code>1</code>, it will call <code>allocate_node(sizeof(T), alignof(T))</code>, otherwise <code>allocate_array(n, sizeof(T), alignof(T))</code>. </dd></dl>
<dl class="section user"><dt>Returns:</dt><dd>A pointer to a memory block suitable for <code>n</code> objects of type <code>T</code>. </dd></dl>
<dl class="section user"><dt>Throws:</dt><dd>Anything thrown by the <code>RawAllocator</code>. </dd></dl>
</div>
</div>
<a id="a32360c6e0b0b34e8d91a0d0f7767b6ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32360c6e0b0b34e8d91a0d0f7767b6ef">&#9670;&nbsp;</a></span>deallocate()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void deallocate </td>
<td>(</td>
<td class="paramtype">pointer&#160;</td>
<td class="paramname"><em>p</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_type&#160;</td>
<td class="paramname"><em>n</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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>Deallcoates memory using the underlying <a href="md_doc_concepts.html#concept_rawallocator">RawAllocator</a>. It will forward to the deallocation function in the same way as in <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a6d7f043644ba31be0c9f4e1928ec3f2f">allocate()</a>. </dd></dl>
<dl class="section user"><dt>Requires:</dt><dd>The pointer must come from a previous call to <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html#a6d7f043644ba31be0c9f4e1928ec3f2f">allocate()</a> with the same <code>n</code> on this object or any copy of it. </dd></dl>
</div>
</div>
<a id="ac91dc09e66922343727d11af1fce04b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac91dc09e66922343727d11af1fce04b9">&#9670;&nbsp;</a></span>construct()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void construct </td>
<td>(</td>
<td class="paramtype">U *&#160;</td>
<td class="paramname"><em>p</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Args &amp;&amp;...&#160;</td>
<td class="paramname"><em>args</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Effects:</dt><dd>Creates an object of type <code>U</code> at given address using the passed arguments. </dd></dl>
</div>
</div>
<a id="aa90e9eae27307478558886c72669d73d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa90e9eae27307478558886c72669d73d">&#9670;&nbsp;</a></span>destroy()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void destroy </td>
<td>(</td>
<td class="paramtype">U *&#160;</td>
<td class="paramname"><em>p</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>Calls the destructor for an object of type <code>U</code> at given address. </dd></dl>
</div>
</div>
<a id="ac2a85e463df4e95c1bf051cfb8237805"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2a85e463df4e95c1bf051cfb8237805">&#9670;&nbsp;</a></span>max_size()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_type max_size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</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 maximum size for an allocation which is <code>max_array_size() / sizeof(value_type)</code>. This is only an upper bound, not the exact maximum. </dd></dl>
</div>
</div>
<a id="a515787687858e1051c3c60131d9849b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a515787687858e1051c3c60131d9849b7">&#9670;&nbsp;</a></span>get_allocator() <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">auto get_allocator </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> -&gt; decltype(std::declval&lt;<a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">alloc_reference</a>&gt;().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>Effects:</dt><dd>Returns a reference to the referenced allocator. </dd></dl>
<dl class="section user"><dt>Returns:</dt><dd>For stateful allocators: A (<code>const</code>) reference to the stored allocator. For stateless allocators: A temporary constructed allocator. </dd></dl>
</div>
</div>
<a id="aecc6ab452fa445dffbe266554beb7e5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aecc6ab452fa445dffbe266554beb7e5a">&#9670;&nbsp;</a></span>get_allocator() <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">auto get_allocator </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const -&gt; decltype(std::declval&lt;const <a class="el" href="classfoonathan_1_1memory_1_1allocator__reference.html">alloc_reference</a>&gt;().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>Effects:</dt><dd>Returns a reference to the referenced allocator. </dd></dl>
<dl class="section user"><dt>Returns:</dt><dd>For stateful allocators: A (<code>const</code>) reference to the stored allocator. For stateless allocators: A temporary constructed allocator. </dd></dl>
</div>
</div>
<h2 class="groupheader">Related Functions</h2>
<a id="ac15a6de6bb77fc58b63b3d387656b61d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac15a6de6bb77fc58b63b3d387656b61d">&#9670;&nbsp;</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">bool operator== </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; T, Impl &gt; &amp;&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; U, Impl &gt; &amp;&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Effects:</dt><dd>Compares two <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a> object, they are equal if either stateless or reference the same allocator. </dd></dl>
<dl class="section user"><dt>Returns:</dt><dd>The result of the comparision for equality. </dd></dl>
</div>
</div>
<a id="ade728d2962d0d3f292e4286f666044cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade728d2962d0d3f292e4286f666044cd">&#9670;&nbsp;</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">bool operator!= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; T, Impl &gt; &amp;&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt; U, Impl &gt; &amp;&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Effects:</dt><dd>Compares two <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a> object, they are equal if either stateless or reference the same allocator. </dd></dl>
<dl class="section user"><dt>Returns:</dt><dd>The result of the comparision for inequality. </dd></dl>
</div>
</div>
<a id="ad4bb35bfde10edb491e593b1938f1614"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4bb35bfde10edb491e593b1938f1614">&#9670;&nbsp;</a></span>make_std_allocator()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto make_std_allocator </td>
<td>(</td>
<td class="paramtype">RawAllocator &amp;&amp;&#160;</td>
<td class="paramname"><em>allocator</em></td><td>)</td>
<td> -&gt; <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a>&lt;T, typename std::decay&lt;RawAllocator&gt;::type&gt;
</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section user"><dt>Returns:</dt><dd>A new <a class="el" href="classfoonathan_1_1memory_1_1std__allocator.html">std_allocator</a> for a given type using a certain allocator object. </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 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
1
https://gitee.com/mobangjack/memory.git
git@gitee.com:mobangjack/memory.git
mobangjack
memory
memory
gh-pages

搜索帮助