This commit is contained in:
manojsdoshi
2020-04-24 01:09:47 +00:00
parent 4ad595bf18
commit 430f6c0cf3
2864 changed files with 304301 additions and 292875 deletions

View File

@@ -98,34 +98,31 @@ $(function() {
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacebeast.html">beast</a> {</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> AgedContainer, <span class="keyword">class</span> Rep, <span class="keyword">class</span> Period&gt;</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="keyword">typename</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/enable_if.html">std::enable_if</a> &lt;</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; is_aged_container &lt;AgedContainer&gt;::value,</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;&gt;::type</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="namespacebeast.html#a5a9b62bcc4646694cbd799ad46a0b149"> 35</a></span>&#160;<a class="code" href="namespacebeast.html#a5a9b62bcc4646694cbd799ad46a0b149">expire</a> (AgedContainer&amp; c, <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::duration &lt;Rep, Period&gt;</a> <span class="keyword">const</span>&amp; age)</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;{</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> n (0);</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> expired (c.clock().now() - age);</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> iter (c.chronological.cbegin());</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; iter != c.chronological.cend() &amp;&amp;</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; iter.when() &lt;= expired;)</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; {</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; iter = c.erase (iter);</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; ++n;</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; }</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keywordflow">return</span> n;</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;}</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;}</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="keyword">typename</span> <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/enable_if.html">std::enable_if&lt;is_aged_container&lt;AgedContainer&gt;::value</a>, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a>&gt;::</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; type</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="namespacebeast.html#a0d4902fd756aee03082ffc8a6f528792"> 33</a></span>&#160; <a class="code" href="namespacebeast.html#a0d4902fd756aee03082ffc8a6f528792">expire</a>(AgedContainer&amp; c, <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::duration&lt;Rep, Period&gt;</a> <span class="keyword">const</span>&amp; age)</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;{</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> n(0);</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keyword">auto</span> <span class="keyword">const</span> expired(c.clock().now() - age);</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> iter(c.chronological.cbegin());</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; iter != c.chronological.cend() &amp;&amp; iter.when() &lt;= expired;)</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; {</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; iter = c.erase(iter);</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; ++n;</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; }</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keywordflow">return</span> n;</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;}</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;} <span class="comment">// namespace beast</span></div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aduration_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::duration</a></div></div>
<div class="ttc" id="aenable_if_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/enable_if.html">std::enable_if</a></div></div>
<div class="ttc" id="anamespacebeast_html_a5a9b62bcc4646694cbd799ad46a0b149"><div class="ttname"><a href="namespacebeast.html#a5a9b62bcc4646694cbd799ad46a0b149">beast::expire</a></div><div class="ttdeci">std::enable_if&lt; is_aged_container&lt; AgedContainer &gt;::value, std::size_t &gt;::type expire(AgedContainer &amp;c, std::chrono::duration&lt; Rep, Period &gt; const &amp;age)</div><div class="ttdoc">Expire aged container items past the specified age.</div><div class="ttdef"><b>Definition:</b> <a href="aged__container__utility_8h_source.html#l00035">aged_container_utility.h:35</a></div></div>
<div class="ttc" id="anamespacebeast_html_a0d4902fd756aee03082ffc8a6f528792"><div class="ttname"><a href="namespacebeast.html#a0d4902fd756aee03082ffc8a6f528792">beast::expire</a></div><div class="ttdeci">std::enable_if&lt; is_aged_container&lt; AgedContainer &gt;::value, std::size_t &gt;::type expire(AgedContainer &amp;c, std::chrono::duration&lt; Rep, Period &gt; const &amp;age)</div><div class="ttdoc">Expire aged container items past the specified age.</div><div class="ttdef"><b>Definition:</b> <a href="aged__container__utility_8h_source.html#l00033">aged_container_utility.h:33</a></div></div>
<div class="ttc" id="asize_t_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></div></div>
<div class="ttc" id="atype_traits_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/type_traits.html">type_traits</a></div></div>
<div class="ttc" id="anamespacebeast_html"><div class="ttname"><a href="namespacebeast.html">beast</a></div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00582">base_uint.h:582</a></div></div>
<div class="ttc" id="anamespacebeast_html"><div class="ttname"><a href="namespacebeast.html">beast</a></div><div class="ttdef"><b>Definition:</b> <a href="base__uint_8h_source.html#l00646">base_uint.h:646</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">