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.
306 lines
29 KiB
306 lines
29 KiB
3 years ago
|
<!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/move.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> - move.h<span style="font-size: 80%;"> (source / <a href="move.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">11</td>
|
||
|
<td class="headerCovTableEntry">11</td>
|
||
|
<td class="headerCovTableEntryHi">100.0 %</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">7</td>
|
||
|
<td class="headerCovTableEntry">8</td>
|
||
|
<td class="headerCovTableEntryMed">87.5 %</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> : : // Move, forward and identity for C++11 + swap -*- C++ -*-</a>
|
||
|
<a name="2"><span class="lineNum"> 2 </span> : : </a>
|
||
|
<a name="3"><span class="lineNum"> 3 </span> : : // Copyright (C) 2007-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> : : // <http://www.gnu.org/licenses/>.</a>
|
||
|
<a name="24"><span class="lineNum"> 24 </span> : : </a>
|
||
|
<a name="25"><span class="lineNum"> 25 </span> : : /** @file bits/move.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{utility}</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 _MOVE_H</a>
|
||
|
<a name="31"><span class="lineNum"> 31 </span> : : #define _MOVE_H 1</a>
|
||
|
<a name="32"><span class="lineNum"> 32 </span> : : </a>
|
||
|
<a name="33"><span class="lineNum"> 33 </span> : : #include <bits/c++config.h></a>
|
||
|
<a name="34"><span class="lineNum"> 34 </span> : : #include <bits/concept_check.h></a>
|
||
|
<a name="35"><span class="lineNum"> 35 </span> : : </a>
|
||
|
<a name="36"><span class="lineNum"> 36 </span> : : namespace std _GLIBCXX_VISIBILITY(default)</a>
|
||
|
<a name="37"><span class="lineNum"> 37 </span> : : {</a>
|
||
|
<a name="38"><span class="lineNum"> 38 </span> : : _GLIBCXX_BEGIN_NAMESPACE_VERSION</a>
|
||
|
<a name="39"><span class="lineNum"> 39 </span> : : </a>
|
||
|
<a name="40"><span class="lineNum"> 40 </span> : : // Used, in C++03 mode too, by allocators, etc.</a>
|
||
|
<a name="41"><span class="lineNum"> 41 </span> : : /**</a>
|
||
|
<a name="42"><span class="lineNum"> 42 </span> : : * @brief Same as C++11 std::addressof</a>
|
||
|
<a name="43"><span class="lineNum"> 43 </span> : : * @ingroup utilities</a>
|
||
|
<a name="44"><span class="lineNum"> 44 </span> : : */</a>
|
||
|
<a name="45"><span class="lineNum"> 45 </span> : : template<typename _Tp></a>
|
||
|
<a name="46"><span class="lineNum"> 46 </span> : : inline _GLIBCXX_CONSTEXPR _Tp*</a>
|
||
|
<a name="47"><span class="lineNum"> 47 </span> :<span class="lineCov"> 62 : __addressof(_Tp& __r) _GLIBCXX_NOEXCEPT</span></a>
|
||
|
<a name="48"><span class="lineNum"> 48 </span> :<span class="lineCov"> 62 : { return __builtin_addressof(__r); }</span></a>
|
||
|
<a name="49"><span class="lineNum"> 49 </span> : : </a>
|
||
|
<a name="50"><span class="lineNum"> 50 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="51"><span class="lineNum"> 51 </span> : : </a>
|
||
|
<a name="52"><span class="lineNum"> 52 </span> : : _GLIBCXX_END_NAMESPACE_VERSION</a>
|
||
|
<a name="53"><span class="lineNum"> 53 </span> : : } // namespace</a>
|
||
|
<a name="54"><span class="lineNum"> 54 </span> : : </a>
|
||
|
<a name="55"><span class="lineNum"> 55 </span> : : #include <type_traits> // Brings in std::declval too.</a>
|
||
|
<a name="56"><span class="lineNum"> 56 </span> : : </a>
|
||
|
<a name="57"><span class="lineNum"> 57 </span> : : namespace std _GLIBCXX_VISIBILITY(default)</a>
|
||
|
<a name="58"><span class="lineNum"> 58 </span> : : {</a>
|
||
|
<a name="59"><span class="lineNum"> 59 </span> : : _GLIBCXX_BEGIN_NAMESPACE_VERSION</a>
|
||
|
<a name="60"><span class="lineNum"> 60 </span> : : </a>
|
||
|
<a name="61"><span class="lineNum"> 61 </span> : : /**</a>
|
||
|
<a name="62"><span class="lineNum"> 62 </span> : : * @addtogroup utilities</a>
|
||
|
<a name="63"><span class="lineNum"> 63 </span> : : * @{</a>
|
||
|
<a name="64"><span class="lineNum"> 64 </span> : : */</a>
|
||
|
<a name="65"><span class="lineNum"> 65 </span> : : </a>
|
||
|
<a name="66"><span class="lineNum"> 66 </span> : : /**</a>
|
||
|
<a name="67"><span class="lineNum"> 67 </span> : : * @brief Forward an lvalue.</a>
|
||
|
<a name="68"><span class="lineNum"> 68 </span> : : * @return The parameter cast to the specified type.</a>
|
||
|
<a name="69"><span class="lineNum"> 69 </span> : : *</a>
|
||
|
<a name="70"><span class="lineNum"> 70 </span> : : * This function is used to implement "perfect forwarding".</a>
|
||
|
<a name="71"><span class="lineNum"> 71 </span> : : */</a>
|
||
|
<a name="72"><span class="lineNum"> 72 </span> : : template<typename _Tp></a>
|
||
|
<a name="73"><span class="lineNum"> 73 </span> : : constexpr _Tp&&</a>
|
||
|
<a name="74"><span class="lineNum"> 74 </span> :<span class="lineCov"> 90 : forward(typename std::remove_reference<_Tp>::type& __t) noexcept</span></a>
|
||
|
<a name="75"><span class="lineNum"> 75 </span> :<span class="lineCov"> 90 : { return static_cast<_Tp&&>(__t); }</span></a>
|
||
|
<a name="76"><span class="lineNum"> 76 </span> : : </a>
|
||
|
<a name="77"><span class="lineNum"> 77 </span> : : /**</a>
|
||
|
<a name="78"><span class="lineNum"> 78 </span> : : * @brief Forward an rvalue.</a>
|
||
|
<a name="79"><span class="lineNum"> 79 </span> : : * @return The parameter cast to the specified type.</a>
|
||
|
<a name="80"><span class="lineNum"> 80 </span> : : *</a>
|
||
|
<a name="81"><span class="lineNum"> 81 </span> : : * This function is used to implement "perfect forwarding".</a>
|
||
|
<a name="82"><span class="lineNum"> 82 </span> : : */</a>
|
||
|
<a name="83"><span class="lineNum"> 83 </span> : : template<typename _Tp></a>
|
||
|
<a name="84"><span class="lineNum"> 84 </span> : : constexpr _Tp&&</a>
|
||
|
<a name="85"><span class="lineNum"> 85 </span> : : forward(typename std::remove_reference<_Tp>::type&& __t) noexcept</a>
|
||
|
<a name="86"><span class="lineNum"> 86 </span> : : {</a>
|
||
|
<a name="87"><span class="lineNum"> 87 </span> : : static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument"</a>
|
||
|
<a name="88"><span class="lineNum"> 88 </span> : : " substituting _Tp is an lvalue reference type");</a>
|
||
|
<a name="89"><span class="lineNum"> 89 </span> : : return static_cast<_Tp&&>(__t);</a>
|
||
|
<a name="90"><span class="lineNum"> 90 </span> : : }</a>
|
||
|
<a name="91"><span class="lineNum"> 91 </span> : : </a>
|
||
|
<a name="92"><span class="lineNum"> 92 </span> : : /**</a>
|
||
|
<a name="93"><span class="lineNum"> 93 </span> : : * @brief Convert a value to an rvalue.</a>
|
||
|
<a name="94"><span class="lineNum"> 94 </span> : : * @param __t A thing of arbitrary type.</a>
|
||
|
<a name="95"><span class="lineNum"> 95 </span> : : * @return The parameter cast to an rvalue-reference to allow moving it.</a>
|
||
|
<a name="96"><span class="lineNum"> 96 </span> : : */</a>
|
||
|
<a name="97"><span class="lineNum"> 97 </span> : : template<typename _Tp></a>
|
||
|
<a name="98"><span class="lineNum"> 98 </span> : : constexpr typename std::remove_reference<_Tp>::type&&</a>
|
||
|
<a name="99"><span class="lineNum"> 99 </span> :<span class="lineCov"> 162 : move(_Tp&& __t) noexcept</span></a>
|
||
|
<a name="100"><span class="lineNum"> 100 </span> :<span class="lineCov"> 162 : { return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }</span></a>
|
||
|
<a name="101"><span class="lineNum"> 101 </span> : : </a>
|
||
|
<a name="102"><span class="lineNum"> 102 </span> : : </a>
|
||
|
<a name="103"><span class="lineNum"> 103 </span> : : template<typename _Tp></a>
|
||
|
<a name="104"><span class="lineNum"> 104 </span> : : struct __move_if_noexcept_cond</a>
|
||
|
<a name="105"><span class="lineNum"> 105 </span> : : : public __and_<__not_<is_nothrow_move_constructible<_Tp>>,</a>
|
||
|
<a name="106"><span class="lineNum"> 106 </span> : : is_copy_constructible<_Tp>>::type { };</a>
|
||
|
<a name="107"><span class="lineNum"> 107 </span> : : </a>
|
||
|
<a name="108"><span class="lineNum"> 108 </span> : : /**</a>
|
||
|
<a name="109"><span class="lineNum"> 109 </span> : : * @brief Conditionally convert a value to an rvalue.</a>
|
||
|
<a name="110"><span class="lineNum"> 110 </span> : : * @param __x A thing of arbitrary type.</a>
|
||
|
<a name="111"><span class="lineNum"> 111 </span> : : * @return The parameter, possibly cast to an rvalue-reference.</a>
|
||
|
<a name="112"><span class="lineNum"> 112 </span> : : *</a>
|
||
|
<a name="113"><span class="lineNum"> 113 </span> : : * Same as std::move unless the type's move constructor could throw and the</a>
|
||
|
<a name="114"><span class="lineNum"> 114 </span> : : * type is copyable, in which case an lvalue-reference is returned instead.</a>
|
||
|
<a name="115"><span class="lineNum"> 115 </span> : : */</a>
|
||
|
<a name="116"><span class="lineNum"> 116 </span> : : template<typename _Tp></a>
|
||
|
<a name="117"><span class="lineNum"> 117 </span> : : constexpr typename</a>
|
||
|
<a name="118"><span class="lineNum"> 118 </span> : : conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type</a>
|
||
|
<a name="119"><span class="lineNum"> 119 </span> : : move_if_noexcept(_Tp& __x) noexcept</a>
|
||
|
<a name="120"><span class="lineNum"> 120 </span> : : { return std::move(__x); }</a>
|
||
|
<a name="121"><span class="lineNum"> 121 </span> : : </a>
|
||
|
<a name="122"><span class="lineNum"> 122 </span> : : // declval, from type_traits.</a>
|
||
|
<a name="123"><span class="lineNum"> 123 </span> : : </a>
|
||
|
<a name="124"><span class="lineNum"> 124 </span> : : #if __cplusplus > 201402L</a>
|
||
|
<a name="125"><span class="lineNum"> 125 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="126"><span class="lineNum"> 126 </span> : : // 2296. std::addressof should be constexpr</a>
|
||
|
<a name="127"><span class="lineNum"> 127 </span> : : # define __cpp_lib_addressof_constexpr 201603</a>
|
||
|
<a name="128"><span class="lineNum"> 128 </span> : : #endif</a>
|
||
|
<a name="129"><span class="lineNum"> 129 </span> : : /**</a>
|
||
|
<a name="130"><span class="lineNum"> 130 </span> : : * @brief Returns the actual address of the object or function</a>
|
||
|
<a name="131"><span class="lineNum"> 131 </span> : : * referenced by r, even in the presence of an overloaded</a>
|
||
|
<a name="132"><span class="lineNum"> 132 </span> : : * operator&.</a>
|
||
|
<a name="133"><span class="lineNum"> 133 </span> : : * @param __r Reference to an object or function.</a>
|
||
|
<a name="134"><span class="lineNum"> 134 </span> : : * @return The actual address.</a>
|
||
|
<a name="135"><span class="lineNum"> 135 </span> : : */</a>
|
||
|
<a name="136"><span class="lineNum"> 136 </span> : : template<typename _Tp></a>
|
||
|
<a name="137"><span class="lineNum"> 137 </span> : : inline _GLIBCXX17_CONSTEXPR _Tp*</a>
|
||
|
<a name="138"><span class="lineNum"> 138 </span> : : addressof(_Tp& __r) noexcept</a>
|
||
|
<a name="139"><span class="lineNum"> 139 </span> : : { return std::__addressof(__r); }</a>
|
||
|
<a name="140"><span class="lineNum"> 140 </span> : : </a>
|
||
|
<a name="141"><span class="lineNum"> 141 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="142"><span class="lineNum"> 142 </span> : : // 2598. addressof works on temporaries</a>
|
||
|
<a name="143"><span class="lineNum"> 143 </span> : : template<typename _Tp></a>
|
||
|
<a name="144"><span class="lineNum"> 144 </span> : : const _Tp* addressof(const _Tp&&) = delete;</a>
|
||
|
<a name="145"><span class="lineNum"> 145 </span> : : </a>
|
||
|
<a name="146"><span class="lineNum"> 146 </span> : : // C++11 version of std::exchange for internal use.</a>
|
||
|
<a name="147"><span class="lineNum"> 147 </span> : : template <typename _Tp, typename _Up = _Tp></a>
|
||
|
<a name="148"><span class="lineNum"> 148 </span> : : inline _Tp</a>
|
||
|
<a name="149"><span class="lineNum"> 149 </span> : : __exchange(_Tp& __obj, _Up&& __new_val)</a>
|
||
|
<a name="150"><span class="lineNum"> 150 </span> : : {</a>
|
||
|
<a name="151"><span class="lineNum"> 151 </span> : : _Tp __old_val = std::move(__obj);</a>
|
||
|
<a name="152"><span class="lineNum"> 152 </span> : : __obj = std::forward<_Up>(__new_val);</a>
|
||
|
<a name="153"><span class="lineNum"> 153 </span> : : return __old_val;</a>
|
||
|
<a name="154"><span class="lineNum"> 154 </span> : : }</a>
|
||
|
<a name="155"><span class="lineNum"> 155 </span> : : </a>
|
||
|
<a name="156"><span class="lineNum"> 156 </span> : : /// @} group utilities</a>
|
||
|
<a name="157"><span class="lineNum"> 157 </span> : : </a>
|
||
|
<a name="158"><span class="lineNum"> 158 </span> : : #define _GLIBCXX_MOVE(__val) std::move(__val)</a>
|
||
|
<a name="159"><span class="lineNum"> 159 </span> : : #define _GLIBCXX_FORWARD(_Tp, __val) std::forward<_Tp>(__val)</a>
|
||
|
<a name="160"><span class="lineNum"> 160 </span> : : #else</a>
|
||
|
<a name="161"><span class="lineNum"> 161 </span> : : #define _GLIBCXX_MOVE(__val) (__val)</a>
|
||
|
<a name="162"><span class="lineNum"> 162 </span> : : #define _GLIBCXX_FORWARD(_Tp, __val) (__val)</a>
|
||
|
<a name="163"><span class="lineNum"> 163 </span> : : #endif</a>
|
||
|
<a name="164"><span class="lineNum"> 164 </span> : : </a>
|
||
|
<a name="165"><span class="lineNum"> 165 </span> : : /**</a>
|
||
|
<a name="166"><span class="lineNum"> 166 </span> : : * @addtogroup utilities</a>
|
||
|
<a name="167"><span class="lineNum"> 167 </span> : : * @{</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> : : /**</a>
|
||
|
<a name="171"><span class="lineNum"> 171 </span> : : * @brief Swaps two values.</a>
|
||
|
<a name="172"><span class="lineNum"> 172 </span> : : * @param __a A thing of arbitrary type.</a>
|
||
|
<a name="173"><span class="lineNum"> 173 </span> : : * @param __b Another thing of arbitrary type.</a>
|
||
|
<a name="174"><span class="lineNum"> 174 </span> : : * @return Nothing.</a>
|
||
|
<a name="175"><span class="lineNum"> 175 </span> : : */</a>
|
||
|
<a name="176"><span class="lineNum"> 176 </span> : : template<typename _Tp></a>
|
||
|
<a name="177"><span class="lineNum"> 177 </span> : : inline</a>
|
||
|
<a name="178"><span class="lineNum"> 178 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="179"><span class="lineNum"> 179 </span> : : typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,</a>
|
||
|
<a name="180"><span class="lineNum"> 180 </span> : : is_move_constructible<_Tp>,</a>
|
||
|
<a name="181"><span class="lineNum"> 181 </span> : : is_move_assignable<_Tp>>::value>::type</a>
|
||
|
<a name="182"><span class="lineNum"> 182 </span> :<span class="lineCov"> 41 : swap(_Tp& __a, _Tp& __b)</span></a>
|
||
|
<a name="183"><span class="lineNum"> 183 </span> : : noexcept(__and_<is_nothrow_move_constructible<_Tp>,</a>
|
||
|
<a name="184"><span class="lineNum"> 184 </span> : : is_nothrow_move_assignable<_Tp>>::value)</a>
|
||
|
<a name="185"><span class="lineNum"> 185 </span> : : #else</a>
|
||
|
<a name="186"><span class="lineNum"> 186 </span> : : void</a>
|
||
|
<a name="187"><span class="lineNum"> 187 </span> : : swap(_Tp& __a, _Tp& __b)</a>
|
||
|
<a name="188"><span class="lineNum"> 188 </span> : : #endif</a>
|
||
|
<a name="189"><span class="lineNum"> 189 </span> : : {</a>
|
||
|
<a name="190"><span class="lineNum"> 190 </span> : : // concept requirements</a>
|
||
|
<a name="191"><span class="lineNum"> 191 </span> : : __glibcxx_function_requires(_SGIAssignableConcept<_Tp>)</a>
|
||
|
<a name="192"><span class="lineNum"> 192 </span> : : </a>
|
||
|
<a name="193"><span class="lineNum"> 193 </span> :<span class="lineCov"> 41 : _Tp __tmp = _GLIBCXX_MOVE(__a);</span></a>
|
||
|
<a name="194"><span class="lineNum"> 194 </span> :<span class="lineCov"> 41 : __a = _GLIBCXX_MOVE(__b);</span></a>
|
||
|
<a name="195"><span class="lineNum"> 195 </span> :<span class="lineCov"> 41 : __b = _GLIBCXX_MOVE(__tmp);</span></a>
|
||
|
<a name="196"><span class="lineNum"> 196 </span> :<span class="lineCov"> 41 : }</span></a>
|
||
|
<a name="197"><span class="lineNum"> 197 </span> : : </a>
|
||
|
<a name="198"><span class="lineNum"> 198 </span> : : // _GLIBCXX_RESOLVE_LIB_DEFECTS</a>
|
||
|
<a name="199"><span class="lineNum"> 199 </span> : : // DR 809. std::swap should be overloaded for array types.</a>
|
||
|
<a name="200"><span class="lineNum"> 200 </span> : : /// Swap the contents of two arrays.</a>
|
||
|
<a name="201"><span class="lineNum"> 201 </span> : : template<typename _Tp, size_t _Nm></a>
|
||
|
<a name="202"><span class="lineNum"> 202 </span> : : inline</a>
|
||
|
<a name="203"><span class="lineNum"> 203 </span> : : #if __cplusplus >= 201103L</a>
|
||
|
<a name="204"><span class="lineNum"> 204 </span> : : typename enable_if<__is_swappable<_Tp>::value>::type</a>
|
||
|
<a name="205"><span class="lineNum"> 205 </span> : : swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])</a>
|
||
|
<a name="206"><span class="lineNum"> 206 </span> : : noexcept(__is_nothrow_swappable<_Tp>::value)</a>
|
||
|
<a name="207"><span class="lineNum"> 207 </span> : : #else</a>
|
||
|
<a name="208"><span class="lineNum"> 208 </span> : : void</a>
|
||
|
<a name="209"><span class="lineNum"> 209 </span> : : swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])</a>
|
||
|
<a name="210"><span class="lineNum"> 210 </span> : : #endif</a>
|
||
|
<a name="211"><span class="lineNum"> 211 </span> : : {</a>
|
||
|
<a name="212"><span class="lineNum"> 212 </span> : : for (size_t __n = 0; __n < _Nm; ++__n)</a>
|
||
|
<a name="213"><span class="lineNum"> 213 </span> : : swap(__a[__n], __b[__n]);</a>
|
||
|
<a name="214"><span class="lineNum"> 214 </span> : : }</a>
|
||
|
<a name="215"><span class="lineNum"> 215 </span> : : </a>
|
||
|
<a name="216"><span class="lineNum"> 216 </span> : : /// @} group utilities</a>
|
||
|
<a name="217"><span class="lineNum"> 217 </span> : : _GLIBCXX_END_NAMESPACE_VERSION</a>
|
||
|
<a name="218"><span class="lineNum"> 218 </span> : : } // namespace</a>
|
||
|
<a name="219"><span class="lineNum"> 219 </span> : : </a>
|
||
|
<a name="220"><span class="lineNum"> 220 </span> : : #endif /* _MOVE_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>
|