You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SQA-Homework/gcov & lcov/output/9/bits/alloc_traits.h.gcov.html

729 lines
81 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LCOV - test.info - 9/bits/alloc_traits.h</title>
<link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>
<body>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="title">LCOV - code coverage report</td></tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr>
<td width="100%">
<table cellpadding=1 border=0 width="100%">
<tr>
<td width="10%" class="headerItem">Current view:</td>
<td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">9/bits</a> - alloc_traits.h<span style="font-size: 80%;"> (source / <a href="alloc_traits.h.func-sort-c.html">functions</a>)</span></td>
<td width="5%"></td>
<td width="15%"></td>
<td width="10%" class="headerCovTableHead">Hit</td>
<td width="10%" class="headerCovTableHead">Total</td>
<td width="15%" class="headerCovTableHead">Coverage</td>
</tr>
<tr>
<td class="headerItem">Test:</td>
<td class="headerValue">test.info</td>
<td></td>
<td class="headerItem">Lines:</td>
<td class="headerCovTableEntry">8</td>
<td class="headerCovTableEntry">15</td>
<td class="headerCovTableEntryLo">53.3 %</td>
</tr>
<tr>
<td class="headerItem">Date:</td>
<td class="headerValue">2022-06-07 00:30:42</td>
<td></td>
<td class="headerItem">Functions:</td>
<td class="headerCovTableEntry">4</td>
<td class="headerCovTableEntry">7</td>
<td class="headerCovTableEntryLo">57.1 %</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td class="headerItem">Branches:</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntry">0</td>
<td class="headerCovTableEntryHi">-</td>
</tr>
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
</td>
</tr>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
</table>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td><br></td>
</tr>
<tr>
<td>
<pre class="sourceHeading"> Branch data Line data Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum"> 1 </span> : : // Allocator traits -*- C++ -*-</a>
<a name="2"><span class="lineNum"> 2 </span> : : </a>
<a name="3"><span class="lineNum"> 3 </span> : : // Copyright (C) 2011-2019 Free Software Foundation, Inc.</a>
<a name="4"><span class="lineNum"> 4 </span> : : //</a>
<a name="5"><span class="lineNum"> 5 </span> : : // This file is part of the GNU ISO C++ Library. This library is free</a>
<a name="6"><span class="lineNum"> 6 </span> : : // software; you can redistribute it and/or modify it under the</a>
<a name="7"><span class="lineNum"> 7 </span> : : // terms of the GNU General Public License as published by the</a>
<a name="8"><span class="lineNum"> 8 </span> : : // Free Software Foundation; either version 3, or (at your option)</a>
<a name="9"><span class="lineNum"> 9 </span> : : // any later version.</a>
<a name="10"><span class="lineNum"> 10 </span> : : </a>
<a name="11"><span class="lineNum"> 11 </span> : : // This library is distributed in the hope that it will be useful,</a>
<a name="12"><span class="lineNum"> 12 </span> : : // but WITHOUT ANY WARRANTY; without even the implied warranty of</a>
<a name="13"><span class="lineNum"> 13 </span> : : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</a>
<a name="14"><span class="lineNum"> 14 </span> : : // GNU General Public License for more details.</a>
<a name="15"><span class="lineNum"> 15 </span> : : </a>
<a name="16"><span class="lineNum"> 16 </span> : : // Under Section 7 of GPL version 3, you are granted additional</a>
<a name="17"><span class="lineNum"> 17 </span> : : // permissions described in the GCC Runtime Library Exception, version</a>
<a name="18"><span class="lineNum"> 18 </span> : : // 3.1, as published by the Free Software Foundation.</a>
<a name="19"><span class="lineNum"> 19 </span> : : </a>
<a name="20"><span class="lineNum"> 20 </span> : : // You should have received a copy of the GNU General Public License and</a>
<a name="21"><span class="lineNum"> 21 </span> : : // a copy of the GCC Runtime Library Exception along with this program;</a>
<a name="22"><span class="lineNum"> 22 </span> : : // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see</a>
<a name="23"><span class="lineNum"> 23 </span> : : // &lt;http://www.gnu.org/licenses/&gt;.</a>
<a name="24"><span class="lineNum"> 24 </span> : : </a>
<a name="25"><span class="lineNum"> 25 </span> : : /** @file bits/alloc_traits.h</a>
<a name="26"><span class="lineNum"> 26 </span> : : * This is an internal header file, included by other library headers.</a>
<a name="27"><span class="lineNum"> 27 </span> : : * Do not attempt to use it directly. @headername{memory}</a>
<a name="28"><span class="lineNum"> 28 </span> : : */</a>
<a name="29"><span class="lineNum"> 29 </span> : : </a>
<a name="30"><span class="lineNum"> 30 </span> : : #ifndef _ALLOC_TRAITS_H</a>
<a name="31"><span class="lineNum"> 31 </span> : : #define _ALLOC_TRAITS_H 1</a>
<a name="32"><span class="lineNum"> 32 </span> : : </a>
<a name="33"><span class="lineNum"> 33 </span> : : #if __cplusplus &gt;= 201103L</a>
<a name="34"><span class="lineNum"> 34 </span> : : </a>
<a name="35"><span class="lineNum"> 35 </span> : : #include &lt;bits/memoryfwd.h&gt;</a>
<a name="36"><span class="lineNum"> 36 </span> : : #include &lt;bits/ptr_traits.h&gt;</a>
<a name="37"><span class="lineNum"> 37 </span> : : #include &lt;ext/numeric_traits.h&gt;</a>
<a name="38"><span class="lineNum"> 38 </span> : : </a>
<a name="39"><span class="lineNum"> 39 </span> : : #define __cpp_lib_allocator_traits_is_always_equal 201411</a>
<a name="40"><span class="lineNum"> 40 </span> : : </a>
<a name="41"><span class="lineNum"> 41 </span> : : namespace std _GLIBCXX_VISIBILITY(default)</a>
<a name="42"><span class="lineNum"> 42 </span> : : {</a>
<a name="43"><span class="lineNum"> 43 </span> : : _GLIBCXX_BEGIN_NAMESPACE_VERSION</a>
<a name="44"><span class="lineNum"> 44 </span> : : </a>
<a name="45"><span class="lineNum"> 45 </span> : : struct __allocator_traits_base</a>
<a name="46"><span class="lineNum"> 46 </span> : : {</a>
<a name="47"><span class="lineNum"> 47 </span> : : template&lt;typename _Tp, typename _Up, typename = void&gt;</a>
<a name="48"><span class="lineNum"> 48 </span> : : struct __rebind : __replace_first_arg&lt;_Tp, _Up&gt; { };</a>
<a name="49"><span class="lineNum"> 49 </span> : : </a>
<a name="50"><span class="lineNum"> 50 </span> : : template&lt;typename _Tp, typename _Up&gt;</a>
<a name="51"><span class="lineNum"> 51 </span> : : struct __rebind&lt;_Tp, _Up,</a>
<a name="52"><span class="lineNum"> 52 </span> : : __void_t&lt;typename _Tp::template rebind&lt;_Up&gt;::other&gt;&gt;</a>
<a name="53"><span class="lineNum"> 53 </span> : : { using type = typename _Tp::template rebind&lt;_Up&gt;::other; };</a>
<a name="54"><span class="lineNum"> 54 </span> : : </a>
<a name="55"><span class="lineNum"> 55 </span> : : protected:</a>
<a name="56"><span class="lineNum"> 56 </span> : : template&lt;typename _Tp&gt;</a>
<a name="57"><span class="lineNum"> 57 </span> : : using __pointer = typename _Tp::pointer;</a>
<a name="58"><span class="lineNum"> 58 </span> : : template&lt;typename _Tp&gt;</a>
<a name="59"><span class="lineNum"> 59 </span> : : using __c_pointer = typename _Tp::const_pointer;</a>
<a name="60"><span class="lineNum"> 60 </span> : : template&lt;typename _Tp&gt;</a>
<a name="61"><span class="lineNum"> 61 </span> : : using __v_pointer = typename _Tp::void_pointer;</a>
<a name="62"><span class="lineNum"> 62 </span> : : template&lt;typename _Tp&gt;</a>
<a name="63"><span class="lineNum"> 63 </span> : : using __cv_pointer = typename _Tp::const_void_pointer;</a>
<a name="64"><span class="lineNum"> 64 </span> : : template&lt;typename _Tp&gt;</a>
<a name="65"><span class="lineNum"> 65 </span> : : using __pocca = typename _Tp::propagate_on_container_copy_assignment;</a>
<a name="66"><span class="lineNum"> 66 </span> : : template&lt;typename _Tp&gt;</a>
<a name="67"><span class="lineNum"> 67 </span> : : using __pocma = typename _Tp::propagate_on_container_move_assignment;</a>
<a name="68"><span class="lineNum"> 68 </span> : : template&lt;typename _Tp&gt;</a>
<a name="69"><span class="lineNum"> 69 </span> : : using __pocs = typename _Tp::propagate_on_container_swap;</a>
<a name="70"><span class="lineNum"> 70 </span> : : template&lt;typename _Tp&gt;</a>
<a name="71"><span class="lineNum"> 71 </span> : : using __equal = typename _Tp::is_always_equal;</a>
<a name="72"><span class="lineNum"> 72 </span> : : };</a>
<a name="73"><span class="lineNum"> 73 </span> : : </a>
<a name="74"><span class="lineNum"> 74 </span> : : template&lt;typename _Alloc, typename _Up&gt;</a>
<a name="75"><span class="lineNum"> 75 </span> : : using __alloc_rebind</a>
<a name="76"><span class="lineNum"> 76 </span> : : = typename __allocator_traits_base::template __rebind&lt;_Alloc, _Up&gt;::type;</a>
<a name="77"><span class="lineNum"> 77 </span> : : </a>
<a name="78"><span class="lineNum"> 78 </span> : : /**</a>
<a name="79"><span class="lineNum"> 79 </span> : : * @brief Uniform interface to all allocator types.</a>
<a name="80"><span class="lineNum"> 80 </span> : : * @ingroup allocators</a>
<a name="81"><span class="lineNum"> 81 </span> : : */</a>
<a name="82"><span class="lineNum"> 82 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="83"><span class="lineNum"> 83 </span> : : struct allocator_traits : __allocator_traits_base</a>
<a name="84"><span class="lineNum"> 84 </span> : : {</a>
<a name="85"><span class="lineNum"> 85 </span> : : /// The allocator type</a>
<a name="86"><span class="lineNum"> 86 </span> : : typedef _Alloc allocator_type;</a>
<a name="87"><span class="lineNum"> 87 </span> : : /// The allocated type</a>
<a name="88"><span class="lineNum"> 88 </span> : : typedef typename _Alloc::value_type value_type;</a>
<a name="89"><span class="lineNum"> 89 </span> : : </a>
<a name="90"><span class="lineNum"> 90 </span> : : /**</a>
<a name="91"><span class="lineNum"> 91 </span> : : * @brief The allocator's pointer type.</a>
<a name="92"><span class="lineNum"> 92 </span> : : *</a>
<a name="93"><span class="lineNum"> 93 </span> : : * @c Alloc::pointer if that type exists, otherwise @c value_type*</a>
<a name="94"><span class="lineNum"> 94 </span> : : */</a>
<a name="95"><span class="lineNum"> 95 </span> : : using pointer = __detected_or_t&lt;value_type*, __pointer, _Alloc&gt;;</a>
<a name="96"><span class="lineNum"> 96 </span> : : </a>
<a name="97"><span class="lineNum"> 97 </span> : : private:</a>
<a name="98"><span class="lineNum"> 98 </span> : : // Select _Func&lt;_Alloc&gt; or pointer_traits&lt;pointer&gt;::rebind&lt;_Tp&gt;</a>
<a name="99"><span class="lineNum"> 99 </span> : : template&lt;template&lt;typename&gt; class _Func, typename _Tp, typename = void&gt;</a>
<a name="100"><span class="lineNum"> 100 </span> : : struct _Ptr</a>
<a name="101"><span class="lineNum"> 101 </span> : : {</a>
<a name="102"><span class="lineNum"> 102 </span> : : using type = typename pointer_traits&lt;pointer&gt;::template rebind&lt;_Tp&gt;;</a>
<a name="103"><span class="lineNum"> 103 </span> : : };</a>
<a name="104"><span class="lineNum"> 104 </span> : : </a>
<a name="105"><span class="lineNum"> 105 </span> : : template&lt;template&lt;typename&gt; class _Func, typename _Tp&gt;</a>
<a name="106"><span class="lineNum"> 106 </span> : : struct _Ptr&lt;_Func, _Tp, __void_t&lt;_Func&lt;_Alloc&gt;&gt;&gt;</a>
<a name="107"><span class="lineNum"> 107 </span> : : {</a>
<a name="108"><span class="lineNum"> 108 </span> : : using type = _Func&lt;_Alloc&gt;;</a>
<a name="109"><span class="lineNum"> 109 </span> : : };</a>
<a name="110"><span class="lineNum"> 110 </span> : : </a>
<a name="111"><span class="lineNum"> 111 </span> : : // Select _A2::difference_type or pointer_traits&lt;_Ptr&gt;::difference_type</a>
<a name="112"><span class="lineNum"> 112 </span> : : template&lt;typename _A2, typename _PtrT, typename = void&gt;</a>
<a name="113"><span class="lineNum"> 113 </span> : : struct _Diff</a>
<a name="114"><span class="lineNum"> 114 </span> : : { using type = typename pointer_traits&lt;_PtrT&gt;::difference_type; };</a>
<a name="115"><span class="lineNum"> 115 </span> : : </a>
<a name="116"><span class="lineNum"> 116 </span> : : template&lt;typename _A2, typename _PtrT&gt;</a>
<a name="117"><span class="lineNum"> 117 </span> : : struct _Diff&lt;_A2, _PtrT, __void_t&lt;typename _A2::difference_type&gt;&gt;</a>
<a name="118"><span class="lineNum"> 118 </span> : : { using type = typename _A2::difference_type; };</a>
<a name="119"><span class="lineNum"> 119 </span> : : </a>
<a name="120"><span class="lineNum"> 120 </span> : : // Select _A2::size_type or make_unsigned&lt;_DiffT&gt;::type</a>
<a name="121"><span class="lineNum"> 121 </span> : : template&lt;typename _A2, typename _DiffT, typename = void&gt;</a>
<a name="122"><span class="lineNum"> 122 </span> : : struct _Size : make_unsigned&lt;_DiffT&gt; { };</a>
<a name="123"><span class="lineNum"> 123 </span> : : </a>
<a name="124"><span class="lineNum"> 124 </span> : : template&lt;typename _A2, typename _DiffT&gt;</a>
<a name="125"><span class="lineNum"> 125 </span> : : struct _Size&lt;_A2, _DiffT, __void_t&lt;typename _A2::size_type&gt;&gt;</a>
<a name="126"><span class="lineNum"> 126 </span> : : { using type = typename _A2::size_type; };</a>
<a name="127"><span class="lineNum"> 127 </span> : : </a>
<a name="128"><span class="lineNum"> 128 </span> : : public:</a>
<a name="129"><span class="lineNum"> 129 </span> : : /**</a>
<a name="130"><span class="lineNum"> 130 </span> : : * @brief The allocator's const pointer type.</a>
<a name="131"><span class="lineNum"> 131 </span> : : *</a>
<a name="132"><span class="lineNum"> 132 </span> : : * @c Alloc::const_pointer if that type exists, otherwise</a>
<a name="133"><span class="lineNum"> 133 </span> : : * &lt;tt&gt; pointer_traits&lt;pointer&gt;::rebind&lt;const value_type&gt; &lt;/tt&gt;</a>
<a name="134"><span class="lineNum"> 134 </span> : : */</a>
<a name="135"><span class="lineNum"> 135 </span> : : using const_pointer = typename _Ptr&lt;__c_pointer, const value_type&gt;::type;</a>
<a name="136"><span class="lineNum"> 136 </span> : : </a>
<a name="137"><span class="lineNum"> 137 </span> : : /**</a>
<a name="138"><span class="lineNum"> 138 </span> : : * @brief The allocator's void pointer type.</a>
<a name="139"><span class="lineNum"> 139 </span> : : *</a>
<a name="140"><span class="lineNum"> 140 </span> : : * @c Alloc::void_pointer if that type exists, otherwise</a>
<a name="141"><span class="lineNum"> 141 </span> : : * &lt;tt&gt; pointer_traits&lt;pointer&gt;::rebind&lt;void&gt; &lt;/tt&gt;</a>
<a name="142"><span class="lineNum"> 142 </span> : : */</a>
<a name="143"><span class="lineNum"> 143 </span> : : using void_pointer = typename _Ptr&lt;__v_pointer, void&gt;::type;</a>
<a name="144"><span class="lineNum"> 144 </span> : : </a>
<a name="145"><span class="lineNum"> 145 </span> : : /**</a>
<a name="146"><span class="lineNum"> 146 </span> : : * @brief The allocator's const void pointer type.</a>
<a name="147"><span class="lineNum"> 147 </span> : : *</a>
<a name="148"><span class="lineNum"> 148 </span> : : * @c Alloc::const_void_pointer if that type exists, otherwise</a>
<a name="149"><span class="lineNum"> 149 </span> : : * &lt;tt&gt; pointer_traits&lt;pointer&gt;::rebind&lt;const void&gt; &lt;/tt&gt;</a>
<a name="150"><span class="lineNum"> 150 </span> : : */</a>
<a name="151"><span class="lineNum"> 151 </span> : : using const_void_pointer = typename _Ptr&lt;__cv_pointer, const void&gt;::type;</a>
<a name="152"><span class="lineNum"> 152 </span> : : </a>
<a name="153"><span class="lineNum"> 153 </span> : : /**</a>
<a name="154"><span class="lineNum"> 154 </span> : : * @brief The allocator's difference type</a>
<a name="155"><span class="lineNum"> 155 </span> : : *</a>
<a name="156"><span class="lineNum"> 156 </span> : : * @c Alloc::difference_type if that type exists, otherwise</a>
<a name="157"><span class="lineNum"> 157 </span> : : * &lt;tt&gt; pointer_traits&lt;pointer&gt;::difference_type &lt;/tt&gt;</a>
<a name="158"><span class="lineNum"> 158 </span> : : */</a>
<a name="159"><span class="lineNum"> 159 </span> : : using difference_type = typename _Diff&lt;_Alloc, pointer&gt;::type;</a>
<a name="160"><span class="lineNum"> 160 </span> : : </a>
<a name="161"><span class="lineNum"> 161 </span> : : /**</a>
<a name="162"><span class="lineNum"> 162 </span> : : * @brief The allocator's size type</a>
<a name="163"><span class="lineNum"> 163 </span> : : *</a>
<a name="164"><span class="lineNum"> 164 </span> : : * @c Alloc::size_type if that type exists, otherwise</a>
<a name="165"><span class="lineNum"> 165 </span> : : * &lt;tt&gt; make_unsigned&lt;difference_type&gt;::type &lt;/tt&gt;</a>
<a name="166"><span class="lineNum"> 166 </span> : : */</a>
<a name="167"><span class="lineNum"> 167 </span> : : using size_type = typename _Size&lt;_Alloc, difference_type&gt;::type;</a>
<a name="168"><span class="lineNum"> 168 </span> : : </a>
<a name="169"><span class="lineNum"> 169 </span> : : /**</a>
<a name="170"><span class="lineNum"> 170 </span> : : * @brief How the allocator is propagated on copy assignment</a>
<a name="171"><span class="lineNum"> 171 </span> : : *</a>
<a name="172"><span class="lineNum"> 172 </span> : : * @c Alloc::propagate_on_container_copy_assignment if that type exists,</a>
<a name="173"><span class="lineNum"> 173 </span> : : * otherwise @c false_type</a>
<a name="174"><span class="lineNum"> 174 </span> : : */</a>
<a name="175"><span class="lineNum"> 175 </span> : : using propagate_on_container_copy_assignment</a>
<a name="176"><span class="lineNum"> 176 </span> : : = __detected_or_t&lt;false_type, __pocca, _Alloc&gt;;</a>
<a name="177"><span class="lineNum"> 177 </span> : : </a>
<a name="178"><span class="lineNum"> 178 </span> : : /**</a>
<a name="179"><span class="lineNum"> 179 </span> : : * @brief How the allocator is propagated on move assignment</a>
<a name="180"><span class="lineNum"> 180 </span> : : *</a>
<a name="181"><span class="lineNum"> 181 </span> : : * @c Alloc::propagate_on_container_move_assignment if that type exists,</a>
<a name="182"><span class="lineNum"> 182 </span> : : * otherwise @c false_type</a>
<a name="183"><span class="lineNum"> 183 </span> : : */</a>
<a name="184"><span class="lineNum"> 184 </span> : : using propagate_on_container_move_assignment</a>
<a name="185"><span class="lineNum"> 185 </span> : : = __detected_or_t&lt;false_type, __pocma, _Alloc&gt;;</a>
<a name="186"><span class="lineNum"> 186 </span> : : </a>
<a name="187"><span class="lineNum"> 187 </span> : : /**</a>
<a name="188"><span class="lineNum"> 188 </span> : : * @brief How the allocator is propagated on swap</a>
<a name="189"><span class="lineNum"> 189 </span> : : *</a>
<a name="190"><span class="lineNum"> 190 </span> : : * @c Alloc::propagate_on_container_swap if that type exists,</a>
<a name="191"><span class="lineNum"> 191 </span> : : * otherwise @c false_type</a>
<a name="192"><span class="lineNum"> 192 </span> : : */</a>
<a name="193"><span class="lineNum"> 193 </span> : : using propagate_on_container_swap</a>
<a name="194"><span class="lineNum"> 194 </span> : : = __detected_or_t&lt;false_type, __pocs, _Alloc&gt;;</a>
<a name="195"><span class="lineNum"> 195 </span> : : </a>
<a name="196"><span class="lineNum"> 196 </span> : : /**</a>
<a name="197"><span class="lineNum"> 197 </span> : : * @brief Whether all instances of the allocator type compare equal.</a>
<a name="198"><span class="lineNum"> 198 </span> : : *</a>
<a name="199"><span class="lineNum"> 199 </span> : : * @c Alloc::is_always_equal if that type exists,</a>
<a name="200"><span class="lineNum"> 200 </span> : : * otherwise @c is_empty&lt;Alloc&gt;::type</a>
<a name="201"><span class="lineNum"> 201 </span> : : */</a>
<a name="202"><span class="lineNum"> 202 </span> : : using is_always_equal</a>
<a name="203"><span class="lineNum"> 203 </span> : : = __detected_or_t&lt;typename is_empty&lt;_Alloc&gt;::type, __equal, _Alloc&gt;;</a>
<a name="204"><span class="lineNum"> 204 </span> : : </a>
<a name="205"><span class="lineNum"> 205 </span> : : template&lt;typename _Tp&gt;</a>
<a name="206"><span class="lineNum"> 206 </span> : : using rebind_alloc = __alloc_rebind&lt;_Alloc, _Tp&gt;;</a>
<a name="207"><span class="lineNum"> 207 </span> : : template&lt;typename _Tp&gt;</a>
<a name="208"><span class="lineNum"> 208 </span> : : using rebind_traits = allocator_traits&lt;rebind_alloc&lt;_Tp&gt;&gt;;</a>
<a name="209"><span class="lineNum"> 209 </span> : : </a>
<a name="210"><span class="lineNum"> 210 </span> : : private:</a>
<a name="211"><span class="lineNum"> 211 </span> : : template&lt;typename _Alloc2&gt;</a>
<a name="212"><span class="lineNum"> 212 </span> : : static auto</a>
<a name="213"><span class="lineNum"> 213 </span> : : _S_allocate(_Alloc2&amp; __a, size_type __n, const_void_pointer __hint, int)</a>
<a name="214"><span class="lineNum"> 214 </span> : : -&gt; decltype(__a.allocate(__n, __hint))</a>
<a name="215"><span class="lineNum"> 215 </span> : : { return __a.allocate(__n, __hint); }</a>
<a name="216"><span class="lineNum"> 216 </span> : : </a>
<a name="217"><span class="lineNum"> 217 </span> : : template&lt;typename _Alloc2&gt;</a>
<a name="218"><span class="lineNum"> 218 </span> : : static pointer</a>
<a name="219"><span class="lineNum"> 219 </span> : : _S_allocate(_Alloc2&amp; __a, size_type __n, const_void_pointer, ...)</a>
<a name="220"><span class="lineNum"> 220 </span> : : { return __a.allocate(__n); }</a>
<a name="221"><span class="lineNum"> 221 </span> : : </a>
<a name="222"><span class="lineNum"> 222 </span> : : template&lt;typename _Tp, typename... _Args&gt;</a>
<a name="223"><span class="lineNum"> 223 </span> : : struct __construct_helper</a>
<a name="224"><span class="lineNum"> 224 </span> : : {</a>
<a name="225"><span class="lineNum"> 225 </span> : : template&lt;typename _Alloc2,</a>
<a name="226"><span class="lineNum"> 226 </span> : : typename = decltype(std::declval&lt;_Alloc2*&gt;()-&gt;construct(</a>
<a name="227"><span class="lineNum"> 227 </span> : : std::declval&lt;_Tp*&gt;(), std::declval&lt;_Args&gt;()...))&gt;</a>
<a name="228"><span class="lineNum"> 228 </span> : : static true_type __test(int);</a>
<a name="229"><span class="lineNum"> 229 </span> : : </a>
<a name="230"><span class="lineNum"> 230 </span> : : template&lt;typename&gt;</a>
<a name="231"><span class="lineNum"> 231 </span> : : static false_type __test(...);</a>
<a name="232"><span class="lineNum"> 232 </span> : : </a>
<a name="233"><span class="lineNum"> 233 </span> : : using type = decltype(__test&lt;_Alloc&gt;(0));</a>
<a name="234"><span class="lineNum"> 234 </span> : : };</a>
<a name="235"><span class="lineNum"> 235 </span> : : </a>
<a name="236"><span class="lineNum"> 236 </span> : : template&lt;typename _Tp, typename... _Args&gt;</a>
<a name="237"><span class="lineNum"> 237 </span> : : using __has_construct</a>
<a name="238"><span class="lineNum"> 238 </span> : : = typename __construct_helper&lt;_Tp, _Args...&gt;::type;</a>
<a name="239"><span class="lineNum"> 239 </span> : : </a>
<a name="240"><span class="lineNum"> 240 </span> : : template&lt;typename _Tp, typename... _Args&gt;</a>
<a name="241"><span class="lineNum"> 241 </span> : : static _Require&lt;__has_construct&lt;_Tp, _Args...&gt;&gt;</a>
<a name="242"><span class="lineNum"> 242 </span> : : _S_construct(_Alloc&amp; __a, _Tp* __p, _Args&amp;&amp;... __args)</a>
<a name="243"><span class="lineNum"> 243 </span> : : noexcept(noexcept(__a.construct(__p, std::forward&lt;_Args&gt;(__args)...)))</a>
<a name="244"><span class="lineNum"> 244 </span> : : { __a.construct(__p, std::forward&lt;_Args&gt;(__args)...); }</a>
<a name="245"><span class="lineNum"> 245 </span> : : </a>
<a name="246"><span class="lineNum"> 246 </span> : : template&lt;typename _Tp, typename... _Args&gt;</a>
<a name="247"><span class="lineNum"> 247 </span> : : static</a>
<a name="248"><span class="lineNum"> 248 </span> : : _Require&lt;__and_&lt;__not_&lt;__has_construct&lt;_Tp, _Args...&gt;&gt;,</a>
<a name="249"><span class="lineNum"> 249 </span> : : is_constructible&lt;_Tp, _Args...&gt;&gt;&gt;</a>
<a name="250"><span class="lineNum"> 250 </span> : : _S_construct(_Alloc&amp;, _Tp* __p, _Args&amp;&amp;... __args)</a>
<a name="251"><span class="lineNum"> 251 </span> : : noexcept(std::is_nothrow_constructible&lt;_Tp, _Args...&gt;::value)</a>
<a name="252"><span class="lineNum"> 252 </span> : : { ::new((void*)__p) _Tp(std::forward&lt;_Args&gt;(__args)...); }</a>
<a name="253"><span class="lineNum"> 253 </span> : : </a>
<a name="254"><span class="lineNum"> 254 </span> : : template&lt;typename _Alloc2, typename _Tp&gt;</a>
<a name="255"><span class="lineNum"> 255 </span> : : static auto</a>
<a name="256"><span class="lineNum"> 256 </span> : : _S_destroy(_Alloc2&amp; __a, _Tp* __p, int)</a>
<a name="257"><span class="lineNum"> 257 </span> : : noexcept(noexcept(__a.destroy(__p)))</a>
<a name="258"><span class="lineNum"> 258 </span> : : -&gt; decltype(__a.destroy(__p))</a>
<a name="259"><span class="lineNum"> 259 </span> : : { __a.destroy(__p); }</a>
<a name="260"><span class="lineNum"> 260 </span> : : </a>
<a name="261"><span class="lineNum"> 261 </span> : : template&lt;typename _Alloc2, typename _Tp&gt;</a>
<a name="262"><span class="lineNum"> 262 </span> : : static void</a>
<a name="263"><span class="lineNum"> 263 </span> : : _S_destroy(_Alloc2&amp;, _Tp* __p, ...)</a>
<a name="264"><span class="lineNum"> 264 </span> : : noexcept(std::is_nothrow_destructible&lt;_Tp&gt;::value)</a>
<a name="265"><span class="lineNum"> 265 </span> : : { __p-&gt;~_Tp(); }</a>
<a name="266"><span class="lineNum"> 266 </span> : : </a>
<a name="267"><span class="lineNum"> 267 </span> : : template&lt;typename _Alloc2&gt;</a>
<a name="268"><span class="lineNum"> 268 </span> : : static auto</a>
<a name="269"><span class="lineNum"> 269 </span> : : _S_max_size(_Alloc2&amp; __a, int)</a>
<a name="270"><span class="lineNum"> 270 </span> : : -&gt; decltype(__a.max_size())</a>
<a name="271"><span class="lineNum"> 271 </span> : : { return __a.max_size(); }</a>
<a name="272"><span class="lineNum"> 272 </span> : : </a>
<a name="273"><span class="lineNum"> 273 </span> : : template&lt;typename _Alloc2&gt;</a>
<a name="274"><span class="lineNum"> 274 </span> : : static size_type</a>
<a name="275"><span class="lineNum"> 275 </span> : : _S_max_size(_Alloc2&amp;, ...)</a>
<a name="276"><span class="lineNum"> 276 </span> : : {</a>
<a name="277"><span class="lineNum"> 277 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
<a name="278"><span class="lineNum"> 278 </span> : : // 2466. allocator_traits::max_size() default behavior is incorrect</a>
<a name="279"><span class="lineNum"> 279 </span> : : return __gnu_cxx::__numeric_traits&lt;size_type&gt;::__max</a>
<a name="280"><span class="lineNum"> 280 </span> : : / sizeof(value_type);</a>
<a name="281"><span class="lineNum"> 281 </span> : : }</a>
<a name="282"><span class="lineNum"> 282 </span> : : </a>
<a name="283"><span class="lineNum"> 283 </span> : : template&lt;typename _Alloc2&gt;</a>
<a name="284"><span class="lineNum"> 284 </span> : : static auto</a>
<a name="285"><span class="lineNum"> 285 </span> : : _S_select(_Alloc2&amp; __a, int)</a>
<a name="286"><span class="lineNum"> 286 </span> : : -&gt; decltype(__a.select_on_container_copy_construction())</a>
<a name="287"><span class="lineNum"> 287 </span> : : { return __a.select_on_container_copy_construction(); }</a>
<a name="288"><span class="lineNum"> 288 </span> : : </a>
<a name="289"><span class="lineNum"> 289 </span> : : template&lt;typename _Alloc2&gt;</a>
<a name="290"><span class="lineNum"> 290 </span> : : static _Alloc2</a>
<a name="291"><span class="lineNum"> 291 </span> : : _S_select(_Alloc2&amp; __a, ...)</a>
<a name="292"><span class="lineNum"> 292 </span> : : { return __a; }</a>
<a name="293"><span class="lineNum"> 293 </span> : : </a>
<a name="294"><span class="lineNum"> 294 </span> : : public:</a>
<a name="295"><span class="lineNum"> 295 </span> : : </a>
<a name="296"><span class="lineNum"> 296 </span> : : /**</a>
<a name="297"><span class="lineNum"> 297 </span> : : * @brief Allocate memory.</a>
<a name="298"><span class="lineNum"> 298 </span> : : * @param __a An allocator.</a>
<a name="299"><span class="lineNum"> 299 </span> : : * @param __n The number of objects to allocate space for.</a>
<a name="300"><span class="lineNum"> 300 </span> : : *</a>
<a name="301"><span class="lineNum"> 301 </span> : : * Calls @c a.allocate(n)</a>
<a name="302"><span class="lineNum"> 302 </span> : : */</a>
<a name="303"><span class="lineNum"> 303 </span> : : _GLIBCXX_NODISCARD static pointer</a>
<a name="304"><span class="lineNum"> 304 </span> : : allocate(_Alloc&amp; __a, size_type __n)</a>
<a name="305"><span class="lineNum"> 305 </span> : : { return __a.allocate(__n); }</a>
<a name="306"><span class="lineNum"> 306 </span> : : </a>
<a name="307"><span class="lineNum"> 307 </span> : : /**</a>
<a name="308"><span class="lineNum"> 308 </span> : : * @brief Allocate memory.</a>
<a name="309"><span class="lineNum"> 309 </span> : : * @param __a An allocator.</a>
<a name="310"><span class="lineNum"> 310 </span> : : * @param __n The number of objects to allocate space for.</a>
<a name="311"><span class="lineNum"> 311 </span> : : * @param __hint Aid to locality.</a>
<a name="312"><span class="lineNum"> 312 </span> : : * @return Memory of suitable size and alignment for @a n objects</a>
<a name="313"><span class="lineNum"> 313 </span> : : * of type @c value_type</a>
<a name="314"><span class="lineNum"> 314 </span> : : *</a>
<a name="315"><span class="lineNum"> 315 </span> : : * Returns &lt;tt&gt; a.allocate(n, hint) &lt;/tt&gt; if that expression is</a>
<a name="316"><span class="lineNum"> 316 </span> : : * well-formed, otherwise returns @c a.allocate(n)</a>
<a name="317"><span class="lineNum"> 317 </span> : : */</a>
<a name="318"><span class="lineNum"> 318 </span> : : _GLIBCXX_NODISCARD static pointer</a>
<a name="319"><span class="lineNum"> 319 </span> : : allocate(_Alloc&amp; __a, size_type __n, const_void_pointer __hint)</a>
<a name="320"><span class="lineNum"> 320 </span> : : { return _S_allocate(__a, __n, __hint, 0); }</a>
<a name="321"><span class="lineNum"> 321 </span> : : </a>
<a name="322"><span class="lineNum"> 322 </span> : : /**</a>
<a name="323"><span class="lineNum"> 323 </span> : : * @brief Deallocate memory.</a>
<a name="324"><span class="lineNum"> 324 </span> : : * @param __a An allocator.</a>
<a name="325"><span class="lineNum"> 325 </span> : : * @param __p Pointer to the memory to deallocate.</a>
<a name="326"><span class="lineNum"> 326 </span> : : * @param __n The number of objects space was allocated for.</a>
<a name="327"><span class="lineNum"> 327 </span> : : *</a>
<a name="328"><span class="lineNum"> 328 </span> : : * Calls &lt;tt&gt; a.deallocate(p, n) &lt;/tt&gt;</a>
<a name="329"><span class="lineNum"> 329 </span> : : */</a>
<a name="330"><span class="lineNum"> 330 </span> : : static void</a>
<a name="331"><span class="lineNum"> 331 </span> : : deallocate(_Alloc&amp; __a, pointer __p, size_type __n)</a>
<a name="332"><span class="lineNum"> 332 </span> : : { __a.deallocate(__p, __n); }</a>
<a name="333"><span class="lineNum"> 333 </span> : : </a>
<a name="334"><span class="lineNum"> 334 </span> : : /**</a>
<a name="335"><span class="lineNum"> 335 </span> : : * @brief Construct an object of type `_Tp`</a>
<a name="336"><span class="lineNum"> 336 </span> : : * @param __a An allocator.</a>
<a name="337"><span class="lineNum"> 337 </span> : : * @param __p Pointer to memory of suitable size and alignment for Tp</a>
<a name="338"><span class="lineNum"> 338 </span> : : * @param __args Constructor arguments.</a>
<a name="339"><span class="lineNum"> 339 </span> : : *</a>
<a name="340"><span class="lineNum"> 340 </span> : : * Calls &lt;tt&gt; __a.construct(__p, std::forward&lt;Args&gt;(__args)...) &lt;/tt&gt;</a>
<a name="341"><span class="lineNum"> 341 </span> : : * if that expression is well-formed, otherwise uses placement-new</a>
<a name="342"><span class="lineNum"> 342 </span> : : * to construct an object of type @a _Tp at location @a __p from the</a>
<a name="343"><span class="lineNum"> 343 </span> : : * arguments @a __args...</a>
<a name="344"><span class="lineNum"> 344 </span> : : */</a>
<a name="345"><span class="lineNum"> 345 </span> : : template&lt;typename _Tp, typename... _Args&gt;</a>
<a name="346"><span class="lineNum"> 346 </span> : : static auto construct(_Alloc&amp; __a, _Tp* __p, _Args&amp;&amp;... __args)</a>
<a name="347"><span class="lineNum"> 347 </span> : : noexcept(noexcept(_S_construct(__a, __p,</a>
<a name="348"><span class="lineNum"> 348 </span> : : std::forward&lt;_Args&gt;(__args)...)))</a>
<a name="349"><span class="lineNum"> 349 </span> : : -&gt; decltype(_S_construct(__a, __p, std::forward&lt;_Args&gt;(__args)...))</a>
<a name="350"><span class="lineNum"> 350 </span> : : { _S_construct(__a, __p, std::forward&lt;_Args&gt;(__args)...); }</a>
<a name="351"><span class="lineNum"> 351 </span> : : </a>
<a name="352"><span class="lineNum"> 352 </span> : : /**</a>
<a name="353"><span class="lineNum"> 353 </span> : : * @brief Destroy an object of type @a _Tp</a>
<a name="354"><span class="lineNum"> 354 </span> : : * @param __a An allocator.</a>
<a name="355"><span class="lineNum"> 355 </span> : : * @param __p Pointer to the object to destroy</a>
<a name="356"><span class="lineNum"> 356 </span> : : *</a>
<a name="357"><span class="lineNum"> 357 </span> : : * Calls @c __a.destroy(__p) if that expression is well-formed,</a>
<a name="358"><span class="lineNum"> 358 </span> : : * otherwise calls @c __p-&gt;~_Tp()</a>
<a name="359"><span class="lineNum"> 359 </span> : : */</a>
<a name="360"><span class="lineNum"> 360 </span> : : template&lt;typename _Tp&gt;</a>
<a name="361"><span class="lineNum"> 361 </span> : : static void destroy(_Alloc&amp; __a, _Tp* __p)</a>
<a name="362"><span class="lineNum"> 362 </span> : : noexcept(noexcept(_S_destroy(__a, __p, 0)))</a>
<a name="363"><span class="lineNum"> 363 </span> : : { _S_destroy(__a, __p, 0); }</a>
<a name="364"><span class="lineNum"> 364 </span> : : </a>
<a name="365"><span class="lineNum"> 365 </span> : : /**</a>
<a name="366"><span class="lineNum"> 366 </span> : : * @brief The maximum supported allocation size</a>
<a name="367"><span class="lineNum"> 367 </span> : : * @param __a An allocator.</a>
<a name="368"><span class="lineNum"> 368 </span> : : * @return @c __a.max_size() or @c numeric_limits&lt;size_type&gt;::max()</a>
<a name="369"><span class="lineNum"> 369 </span> : : *</a>
<a name="370"><span class="lineNum"> 370 </span> : : * Returns @c __a.max_size() if that expression is well-formed,</a>
<a name="371"><span class="lineNum"> 371 </span> : : * otherwise returns @c numeric_limits&lt;size_type&gt;::max()</a>
<a name="372"><span class="lineNum"> 372 </span> : : */</a>
<a name="373"><span class="lineNum"> 373 </span> : : static size_type max_size(const _Alloc&amp; __a) noexcept</a>
<a name="374"><span class="lineNum"> 374 </span> : : { return _S_max_size(__a, 0); }</a>
<a name="375"><span class="lineNum"> 375 </span> : : </a>
<a name="376"><span class="lineNum"> 376 </span> : : /**</a>
<a name="377"><span class="lineNum"> 377 </span> : : * @brief Obtain an allocator to use when copying a container.</a>
<a name="378"><span class="lineNum"> 378 </span> : : * @param __rhs An allocator.</a>
<a name="379"><span class="lineNum"> 379 </span> : : * @return @c __rhs.select_on_container_copy_construction() or @a __rhs</a>
<a name="380"><span class="lineNum"> 380 </span> : : *</a>
<a name="381"><span class="lineNum"> 381 </span> : : * Returns @c __rhs.select_on_container_copy_construction() if that</a>
<a name="382"><span class="lineNum"> 382 </span> : : * expression is well-formed, otherwise returns @a __rhs</a>
<a name="383"><span class="lineNum"> 383 </span> : : */</a>
<a name="384"><span class="lineNum"> 384 </span> : : static _Alloc</a>
<a name="385"><span class="lineNum"> 385 </span> : : select_on_container_copy_construction(const _Alloc&amp; __rhs)</a>
<a name="386"><span class="lineNum"> 386 </span> : : { return _S_select(__rhs, 0); }</a>
<a name="387"><span class="lineNum"> 387 </span> : : };</a>
<a name="388"><span class="lineNum"> 388 </span> : : </a>
<a name="389"><span class="lineNum"> 389 </span> : : /// Partial specialization for std::allocator.</a>
<a name="390"><span class="lineNum"> 390 </span> : : template&lt;typename _Tp&gt;</a>
<a name="391"><span class="lineNum"> 391 </span> : : struct allocator_traits&lt;allocator&lt;_Tp&gt;&gt;</a>
<a name="392"><span class="lineNum"> 392 </span> : : {</a>
<a name="393"><span class="lineNum"> 393 </span> : : /// The allocator type</a>
<a name="394"><span class="lineNum"> 394 </span> : : using allocator_type = allocator&lt;_Tp&gt;;</a>
<a name="395"><span class="lineNum"> 395 </span> : : /// The allocated type</a>
<a name="396"><span class="lineNum"> 396 </span> : : using value_type = _Tp;</a>
<a name="397"><span class="lineNum"> 397 </span> : : </a>
<a name="398"><span class="lineNum"> 398 </span> : : /// The allocator's pointer type.</a>
<a name="399"><span class="lineNum"> 399 </span> : : using pointer = _Tp*;</a>
<a name="400"><span class="lineNum"> 400 </span> : : </a>
<a name="401"><span class="lineNum"> 401 </span> : : /// The allocator's const pointer type.</a>
<a name="402"><span class="lineNum"> 402 </span> : : using const_pointer = const _Tp*;</a>
<a name="403"><span class="lineNum"> 403 </span> : : </a>
<a name="404"><span class="lineNum"> 404 </span> : : /// The allocator's void pointer type.</a>
<a name="405"><span class="lineNum"> 405 </span> : : using void_pointer = void*;</a>
<a name="406"><span class="lineNum"> 406 </span> : : </a>
<a name="407"><span class="lineNum"> 407 </span> : : /// The allocator's const void pointer type.</a>
<a name="408"><span class="lineNum"> 408 </span> : : using const_void_pointer = const void*;</a>
<a name="409"><span class="lineNum"> 409 </span> : : </a>
<a name="410"><span class="lineNum"> 410 </span> : : /// The allocator's difference type</a>
<a name="411"><span class="lineNum"> 411 </span> : : using difference_type = std::ptrdiff_t;</a>
<a name="412"><span class="lineNum"> 412 </span> : : </a>
<a name="413"><span class="lineNum"> 413 </span> : : /// The allocator's size type</a>
<a name="414"><span class="lineNum"> 414 </span> : : using size_type = std::size_t;</a>
<a name="415"><span class="lineNum"> 415 </span> : : </a>
<a name="416"><span class="lineNum"> 416 </span> : : /// How the allocator is propagated on copy assignment</a>
<a name="417"><span class="lineNum"> 417 </span> : : using propagate_on_container_copy_assignment = false_type;</a>
<a name="418"><span class="lineNum"> 418 </span> : : </a>
<a name="419"><span class="lineNum"> 419 </span> : : /// How the allocator is propagated on move assignment</a>
<a name="420"><span class="lineNum"> 420 </span> : : using propagate_on_container_move_assignment = true_type;</a>
<a name="421"><span class="lineNum"> 421 </span> : : </a>
<a name="422"><span class="lineNum"> 422 </span> : : /// How the allocator is propagated on swap</a>
<a name="423"><span class="lineNum"> 423 </span> : : using propagate_on_container_swap = false_type;</a>
<a name="424"><span class="lineNum"> 424 </span> : : </a>
<a name="425"><span class="lineNum"> 425 </span> : : /// Whether all instances of the allocator type compare equal.</a>
<a name="426"><span class="lineNum"> 426 </span> : : using is_always_equal = true_type;</a>
<a name="427"><span class="lineNum"> 427 </span> : : </a>
<a name="428"><span class="lineNum"> 428 </span> : : template&lt;typename _Up&gt;</a>
<a name="429"><span class="lineNum"> 429 </span> : : using rebind_alloc = allocator&lt;_Up&gt;;</a>
<a name="430"><span class="lineNum"> 430 </span> : : </a>
<a name="431"><span class="lineNum"> 431 </span> : : template&lt;typename _Up&gt;</a>
<a name="432"><span class="lineNum"> 432 </span> : : using rebind_traits = allocator_traits&lt;allocator&lt;_Up&gt;&gt;;</a>
<a name="433"><span class="lineNum"> 433 </span> : : </a>
<a name="434"><span class="lineNum"> 434 </span> : : /**</a>
<a name="435"><span class="lineNum"> 435 </span> : : * @brief Allocate memory.</a>
<a name="436"><span class="lineNum"> 436 </span> : : * @param __a An allocator.</a>
<a name="437"><span class="lineNum"> 437 </span> : : * @param __n The number of objects to allocate space for.</a>
<a name="438"><span class="lineNum"> 438 </span> : : *</a>
<a name="439"><span class="lineNum"> 439 </span> : : * Calls @c a.allocate(n)</a>
<a name="440"><span class="lineNum"> 440 </span> : : */</a>
<a name="441"><span class="lineNum"> 441 </span> : : _GLIBCXX_NODISCARD static pointer</a>
<a name="442"><span class="lineNum"> 442 </span> :<span class="lineCov"> 18 : allocate(allocator_type&amp; __a, size_type __n)</span></a>
<a name="443"><span class="lineNum"> 443 </span> :<span class="lineCov"> 18 : { return __a.allocate(__n); }</span></a>
<a name="444"><span class="lineNum"> 444 </span> : : </a>
<a name="445"><span class="lineNum"> 445 </span> : : /**</a>
<a name="446"><span class="lineNum"> 446 </span> : : * @brief Allocate memory.</a>
<a name="447"><span class="lineNum"> 447 </span> : : * @param __a An allocator.</a>
<a name="448"><span class="lineNum"> 448 </span> : : * @param __n The number of objects to allocate space for.</a>
<a name="449"><span class="lineNum"> 449 </span> : : * @param __hint Aid to locality.</a>
<a name="450"><span class="lineNum"> 450 </span> : : * @return Memory of suitable size and alignment for @a n objects</a>
<a name="451"><span class="lineNum"> 451 </span> : : * of type @c value_type</a>
<a name="452"><span class="lineNum"> 452 </span> : : *</a>
<a name="453"><span class="lineNum"> 453 </span> : : * Returns &lt;tt&gt; a.allocate(n, hint) &lt;/tt&gt;</a>
<a name="454"><span class="lineNum"> 454 </span> : : */</a>
<a name="455"><span class="lineNum"> 455 </span> : : _GLIBCXX_NODISCARD static pointer</a>
<a name="456"><span class="lineNum"> 456 </span> : : allocate(allocator_type&amp; __a, size_type __n, const_void_pointer __hint)</a>
<a name="457"><span class="lineNum"> 457 </span> : : { return __a.allocate(__n, __hint); }</a>
<a name="458"><span class="lineNum"> 458 </span> : : </a>
<a name="459"><span class="lineNum"> 459 </span> : : /**</a>
<a name="460"><span class="lineNum"> 460 </span> : : * @brief Deallocate memory.</a>
<a name="461"><span class="lineNum"> 461 </span> : : * @param __a An allocator.</a>
<a name="462"><span class="lineNum"> 462 </span> : : * @param __p Pointer to the memory to deallocate.</a>
<a name="463"><span class="lineNum"> 463 </span> : : * @param __n The number of objects space was allocated for.</a>
<a name="464"><span class="lineNum"> 464 </span> : : *</a>
<a name="465"><span class="lineNum"> 465 </span> : : * Calls &lt;tt&gt; a.deallocate(p, n) &lt;/tt&gt;</a>
<a name="466"><span class="lineNum"> 466 </span> : : */</a>
<a name="467"><span class="lineNum"> 467 </span> : : static void</a>
<a name="468"><span class="lineNum"> 468 </span> :<span class="lineCov"> 18 : deallocate(allocator_type&amp; __a, pointer __p, size_type __n)</span></a>
<a name="469"><span class="lineNum"> 469 </span> :<span class="lineCov"> 18 : { __a.deallocate(__p, __n); }</span></a>
<a name="470"><span class="lineNum"> 470 </span> : : </a>
<a name="471"><span class="lineNum"> 471 </span> : : /**</a>
<a name="472"><span class="lineNum"> 472 </span> : : * @brief Construct an object of type @a _Up</a>
<a name="473"><span class="lineNum"> 473 </span> : : * @param __a An allocator.</a>
<a name="474"><span class="lineNum"> 474 </span> : : * @param __p Pointer to memory of suitable size and alignment for Tp</a>
<a name="475"><span class="lineNum"> 475 </span> : : * @param __args Constructor arguments.</a>
<a name="476"><span class="lineNum"> 476 </span> : : *</a>
<a name="477"><span class="lineNum"> 477 </span> : : * Calls &lt;tt&gt; __a.construct(__p, std::forward&lt;Args&gt;(__args)...) &lt;/tt&gt;</a>
<a name="478"><span class="lineNum"> 478 </span> : : */</a>
<a name="479"><span class="lineNum"> 479 </span> : : template&lt;typename _Up, typename... _Args&gt;</a>
<a name="480"><span class="lineNum"> 480 </span> : : static void</a>
<a name="481"><span class="lineNum"> 481 </span> :<span class="lineCov"> 18 : construct(allocator_type&amp; __a, _Up* __p, _Args&amp;&amp;... __args)</span></a>
<a name="482"><span class="lineNum"> 482 </span> : : noexcept(std::is_nothrow_constructible&lt;_Up, _Args...&gt;::value)</a>
<a name="483"><span class="lineNum"> 483 </span> :<span class="lineCov"> 18 : { __a.construct(__p, std::forward&lt;_Args&gt;(__args)...); }</span></a>
<a name="484"><span class="lineNum"> 484 </span> : : </a>
<a name="485"><span class="lineNum"> 485 </span> : : /**</a>
<a name="486"><span class="lineNum"> 486 </span> : : * @brief Destroy an object of type @a _Up</a>
<a name="487"><span class="lineNum"> 487 </span> : : * @param __a An allocator.</a>
<a name="488"><span class="lineNum"> 488 </span> : : * @param __p Pointer to the object to destroy</a>
<a name="489"><span class="lineNum"> 489 </span> : : *</a>
<a name="490"><span class="lineNum"> 490 </span> : : * Calls @c __a.destroy(__p).</a>
<a name="491"><span class="lineNum"> 491 </span> : : */</a>
<a name="492"><span class="lineNum"> 492 </span> : : template&lt;typename _Up&gt;</a>
<a name="493"><span class="lineNum"> 493 </span> : : static void</a>
<a name="494"><span class="lineNum"> 494 </span> :<span class="lineCov"> 18 : destroy(allocator_type&amp; __a, _Up* __p)</span></a>
<a name="495"><span class="lineNum"> 495 </span> : : noexcept(noexcept(__a.destroy(__p)))</a>
<a name="496"><span class="lineNum"> 496 </span> :<span class="lineCov"> 18 : { __a.destroy(__p); }</span></a>
<a name="497"><span class="lineNum"> 497 </span> : : </a>
<a name="498"><span class="lineNum"> 498 </span> : : /**</a>
<a name="499"><span class="lineNum"> 499 </span> : : * @brief The maximum supported allocation size</a>
<a name="500"><span class="lineNum"> 500 </span> : : * @param __a An allocator.</a>
<a name="501"><span class="lineNum"> 501 </span> : : * @return @c __a.max_size()</a>
<a name="502"><span class="lineNum"> 502 </span> : : */</a>
<a name="503"><span class="lineNum"> 503 </span> : : static size_type</a>
<a name="504"><span class="lineNum"> 504 </span> : : max_size(const allocator_type&amp; __a) noexcept</a>
<a name="505"><span class="lineNum"> 505 </span> : : { return __a.max_size(); }</a>
<a name="506"><span class="lineNum"> 506 </span> : : </a>
<a name="507"><span class="lineNum"> 507 </span> : : /**</a>
<a name="508"><span class="lineNum"> 508 </span> : : * @brief Obtain an allocator to use when copying a container.</a>
<a name="509"><span class="lineNum"> 509 </span> : : * @param __rhs An allocator.</a>
<a name="510"><span class="lineNum"> 510 </span> : : * @return @c __rhs</a>
<a name="511"><span class="lineNum"> 511 </span> : : */</a>
<a name="512"><span class="lineNum"> 512 </span> : : static allocator_type</a>
<a name="513"><span class="lineNum"> 513 </span> :<span class="lineNoCov"> 0 : select_on_container_copy_construction(const allocator_type&amp; __rhs)</span></a>
<a name="514"><span class="lineNum"> 514 </span> :<span class="lineNoCov"> 0 : { return __rhs; }</span></a>
<a name="515"><span class="lineNum"> 515 </span> : : };</a>
<a name="516"><span class="lineNum"> 516 </span> : : </a>
<a name="517"><span class="lineNum"> 517 </span> : : </a>
<a name="518"><span class="lineNum"> 518 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="519"><span class="lineNum"> 519 </span> : : inline void</a>
<a name="520"><span class="lineNum"> 520 </span> : : __do_alloc_on_copy(_Alloc&amp; __one, const _Alloc&amp; __two, true_type)</a>
<a name="521"><span class="lineNum"> 521 </span> : : { __one = __two; }</a>
<a name="522"><span class="lineNum"> 522 </span> : : </a>
<a name="523"><span class="lineNum"> 523 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="524"><span class="lineNum"> 524 </span> : : inline void</a>
<a name="525"><span class="lineNum"> 525 </span> :<span class="lineNoCov"> 0 : __do_alloc_on_copy(_Alloc&amp;, const _Alloc&amp;, false_type)</span></a>
<a name="526"><span class="lineNum"> 526 </span> :<span class="lineNoCov"> 0 : { }</span></a>
<a name="527"><span class="lineNum"> 527 </span> : : </a>
<a name="528"><span class="lineNum"> 528 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="529"><span class="lineNum"> 529 </span> :<span class="lineNoCov"> 0 : inline void __alloc_on_copy(_Alloc&amp; __one, const _Alloc&amp; __two)</span></a>
<a name="530"><span class="lineNum"> 530 </span> : : {</a>
<a name="531"><span class="lineNum"> 531 </span> : : typedef allocator_traits&lt;_Alloc&gt; __traits;</a>
<a name="532"><span class="lineNum"> 532 </span> : : typedef typename __traits::propagate_on_container_copy_assignment __pocca;</a>
<a name="533"><span class="lineNum"> 533 </span> :<span class="lineNoCov"> 0 : __do_alloc_on_copy(__one, __two, __pocca());</span></a>
<a name="534"><span class="lineNum"> 534 </span> :<span class="lineNoCov"> 0 : }</span></a>
<a name="535"><span class="lineNum"> 535 </span> : : </a>
<a name="536"><span class="lineNum"> 536 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="537"><span class="lineNum"> 537 </span> : : inline _Alloc __alloc_on_copy(const _Alloc&amp; __a)</a>
<a name="538"><span class="lineNum"> 538 </span> : : {</a>
<a name="539"><span class="lineNum"> 539 </span> : : typedef allocator_traits&lt;_Alloc&gt; __traits;</a>
<a name="540"><span class="lineNum"> 540 </span> : : return __traits::select_on_container_copy_construction(__a);</a>
<a name="541"><span class="lineNum"> 541 </span> : : }</a>
<a name="542"><span class="lineNum"> 542 </span> : : </a>
<a name="543"><span class="lineNum"> 543 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="544"><span class="lineNum"> 544 </span> : : inline void __do_alloc_on_move(_Alloc&amp; __one, _Alloc&amp; __two, true_type)</a>
<a name="545"><span class="lineNum"> 545 </span> : : { __one = std::move(__two); }</a>
<a name="546"><span class="lineNum"> 546 </span> : : </a>
<a name="547"><span class="lineNum"> 547 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="548"><span class="lineNum"> 548 </span> : : inline void __do_alloc_on_move(_Alloc&amp;, _Alloc&amp;, false_type)</a>
<a name="549"><span class="lineNum"> 549 </span> : : { }</a>
<a name="550"><span class="lineNum"> 550 </span> : : </a>
<a name="551"><span class="lineNum"> 551 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="552"><span class="lineNum"> 552 </span> : : inline void __alloc_on_move(_Alloc&amp; __one, _Alloc&amp; __two)</a>
<a name="553"><span class="lineNum"> 553 </span> : : {</a>
<a name="554"><span class="lineNum"> 554 </span> : : typedef allocator_traits&lt;_Alloc&gt; __traits;</a>
<a name="555"><span class="lineNum"> 555 </span> : : typedef typename __traits::propagate_on_container_move_assignment __pocma;</a>
<a name="556"><span class="lineNum"> 556 </span> : : __do_alloc_on_move(__one, __two, __pocma());</a>
<a name="557"><span class="lineNum"> 557 </span> : : }</a>
<a name="558"><span class="lineNum"> 558 </span> : : </a>
<a name="559"><span class="lineNum"> 559 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="560"><span class="lineNum"> 560 </span> : : inline void __do_alloc_on_swap(_Alloc&amp; __one, _Alloc&amp; __two, true_type)</a>
<a name="561"><span class="lineNum"> 561 </span> : : {</a>
<a name="562"><span class="lineNum"> 562 </span> : : using std::swap;</a>
<a name="563"><span class="lineNum"> 563 </span> : : swap(__one, __two);</a>
<a name="564"><span class="lineNum"> 564 </span> : : }</a>
<a name="565"><span class="lineNum"> 565 </span> : : </a>
<a name="566"><span class="lineNum"> 566 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="567"><span class="lineNum"> 567 </span> : : inline void __do_alloc_on_swap(_Alloc&amp;, _Alloc&amp;, false_type)</a>
<a name="568"><span class="lineNum"> 568 </span> : : { }</a>
<a name="569"><span class="lineNum"> 569 </span> : : </a>
<a name="570"><span class="lineNum"> 570 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="571"><span class="lineNum"> 571 </span> : : inline void __alloc_on_swap(_Alloc&amp; __one, _Alloc&amp; __two)</a>
<a name="572"><span class="lineNum"> 572 </span> : : {</a>
<a name="573"><span class="lineNum"> 573 </span> : : typedef allocator_traits&lt;_Alloc&gt; __traits;</a>
<a name="574"><span class="lineNum"> 574 </span> : : typedef typename __traits::propagate_on_container_swap __pocs;</a>
<a name="575"><span class="lineNum"> 575 </span> : : __do_alloc_on_swap(__one, __two, __pocs());</a>
<a name="576"><span class="lineNum"> 576 </span> : : }</a>
<a name="577"><span class="lineNum"> 577 </span> : : </a>
<a name="578"><span class="lineNum"> 578 </span> : : template&lt;typename _Alloc, typename _Tp,</a>
<a name="579"><span class="lineNum"> 579 </span> : : typename _ValueT = __remove_cvref_t&lt;typename _Alloc::value_type&gt;,</a>
<a name="580"><span class="lineNum"> 580 </span> : : typename = void&gt;</a>
<a name="581"><span class="lineNum"> 581 </span> : : struct __is_alloc_insertable_impl</a>
<a name="582"><span class="lineNum"> 582 </span> : : : false_type</a>
<a name="583"><span class="lineNum"> 583 </span> : : { };</a>
<a name="584"><span class="lineNum"> 584 </span> : : </a>
<a name="585"><span class="lineNum"> 585 </span> : : template&lt;typename _Alloc, typename _Tp, typename _ValueT&gt;</a>
<a name="586"><span class="lineNum"> 586 </span> : : struct __is_alloc_insertable_impl&lt;_Alloc, _Tp, _ValueT,</a>
<a name="587"><span class="lineNum"> 587 </span> : : __void_t&lt;decltype(allocator_traits&lt;_Alloc&gt;::construct(</a>
<a name="588"><span class="lineNum"> 588 </span> : : std::declval&lt;_Alloc&amp;&gt;(), std::declval&lt;_ValueT*&gt;(),</a>
<a name="589"><span class="lineNum"> 589 </span> : : std::declval&lt;_Tp&gt;()))&gt;&gt;</a>
<a name="590"><span class="lineNum"> 590 </span> : : : true_type</a>
<a name="591"><span class="lineNum"> 591 </span> : : { };</a>
<a name="592"><span class="lineNum"> 592 </span> : : </a>
<a name="593"><span class="lineNum"> 593 </span> : : // true if _Alloc::value_type is CopyInsertable into containers using _Alloc</a>
<a name="594"><span class="lineNum"> 594 </span> : : // (might be wrong if _Alloc::construct exists but is not constrained,</a>
<a name="595"><span class="lineNum"> 595 </span> : : // i.e. actually trying to use it would still be invalid. Use with caution.)</a>
<a name="596"><span class="lineNum"> 596 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="597"><span class="lineNum"> 597 </span> : : struct __is_copy_insertable</a>
<a name="598"><span class="lineNum"> 598 </span> : : : __is_alloc_insertable_impl&lt;_Alloc,</a>
<a name="599"><span class="lineNum"> 599 </span> : : typename _Alloc::value_type const&amp;&gt;::type</a>
<a name="600"><span class="lineNum"> 600 </span> : : { };</a>
<a name="601"><span class="lineNum"> 601 </span> : : </a>
<a name="602"><span class="lineNum"> 602 </span> : : // std::allocator&lt;_Tp&gt; just requires CopyConstructible</a>
<a name="603"><span class="lineNum"> 603 </span> : : template&lt;typename _Tp&gt;</a>
<a name="604"><span class="lineNum"> 604 </span> : : struct __is_copy_insertable&lt;allocator&lt;_Tp&gt;&gt;</a>
<a name="605"><span class="lineNum"> 605 </span> : : : is_copy_constructible&lt;_Tp&gt;</a>
<a name="606"><span class="lineNum"> 606 </span> : : { };</a>
<a name="607"><span class="lineNum"> 607 </span> : : </a>
<a name="608"><span class="lineNum"> 608 </span> : : // true if _Alloc::value_type is MoveInsertable into containers using _Alloc</a>
<a name="609"><span class="lineNum"> 609 </span> : : // (might be wrong if _Alloc::construct exists but is not constrained,</a>
<a name="610"><span class="lineNum"> 610 </span> : : // i.e. actually trying to use it would still be invalid. Use with caution.)</a>
<a name="611"><span class="lineNum"> 611 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="612"><span class="lineNum"> 612 </span> : : struct __is_move_insertable</a>
<a name="613"><span class="lineNum"> 613 </span> : : : __is_alloc_insertable_impl&lt;_Alloc, typename _Alloc::value_type&gt;::type</a>
<a name="614"><span class="lineNum"> 614 </span> : : { };</a>
<a name="615"><span class="lineNum"> 615 </span> : : </a>
<a name="616"><span class="lineNum"> 616 </span> : : // std::allocator&lt;_Tp&gt; just requires MoveConstructible</a>
<a name="617"><span class="lineNum"> 617 </span> : : template&lt;typename _Tp&gt;</a>
<a name="618"><span class="lineNum"> 618 </span> : : struct __is_move_insertable&lt;allocator&lt;_Tp&gt;&gt;</a>
<a name="619"><span class="lineNum"> 619 </span> : : : is_move_constructible&lt;_Tp&gt;</a>
<a name="620"><span class="lineNum"> 620 </span> : : { };</a>
<a name="621"><span class="lineNum"> 621 </span> : : </a>
<a name="622"><span class="lineNum"> 622 </span> : : // Trait to detect Allocator-like types.</a>
<a name="623"><span class="lineNum"> 623 </span> : : template&lt;typename _Alloc, typename = void&gt;</a>
<a name="624"><span class="lineNum"> 624 </span> : : struct __is_allocator : false_type { };</a>
<a name="625"><span class="lineNum"> 625 </span> : : </a>
<a name="626"><span class="lineNum"> 626 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="627"><span class="lineNum"> 627 </span> : : struct __is_allocator&lt;_Alloc,</a>
<a name="628"><span class="lineNum"> 628 </span> : : __void_t&lt;typename _Alloc::value_type,</a>
<a name="629"><span class="lineNum"> 629 </span> : : decltype(std::declval&lt;_Alloc&amp;&gt;().allocate(size_t{}))&gt;&gt;</a>
<a name="630"><span class="lineNum"> 630 </span> : : : true_type { };</a>
<a name="631"><span class="lineNum"> 631 </span> : : </a>
<a name="632"><span class="lineNum"> 632 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="633"><span class="lineNum"> 633 </span> : : using _RequireAllocator</a>
<a name="634"><span class="lineNum"> 634 </span> : : = typename enable_if&lt;__is_allocator&lt;_Alloc&gt;::value, _Alloc&gt;::type;</a>
<a name="635"><span class="lineNum"> 635 </span> : : </a>
<a name="636"><span class="lineNum"> 636 </span> : : template&lt;typename _Alloc&gt;</a>
<a name="637"><span class="lineNum"> 637 </span> : : using _RequireNotAllocator</a>
<a name="638"><span class="lineNum"> 638 </span> : : = typename enable_if&lt;!__is_allocator&lt;_Alloc&gt;::value, _Alloc&gt;::type;</a>
<a name="639"><span class="lineNum"> 639 </span> : : </a>
<a name="640"><span class="lineNum"> 640 </span> : : _GLIBCXX_END_NAMESPACE_VERSION</a>
<a name="641"><span class="lineNum"> 641 </span> : : } // namespace std</a>
<a name="642"><span class="lineNum"> 642 </span> : : #endif // C++11</a>
<a name="643"><span class="lineNum"> 643 </span> : : #endif // _ALLOC_TRAITS_H</a>
</pre>
</td>
</tr>
</table>
<br>
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
<tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
</table>
<br>
</body>
</html>