Micro template library A library for building device drivers
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.
 
 
 
 

116 lines
14 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.14"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>uTL: include/utl/concepts/iterators.h Source File</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="resize.js"></script>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript">
  17. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  18. $(document).ready(initResizable);
  19. /* @license-end */</script>
  20. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  21. <script type="text/javascript" src="search/searchdata.js"></script>
  22. <script type="text/javascript" src="search/search.js"></script>
  23. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  24. </head>
  25. <body>
  26. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  27. <div id="titlearea">
  28. <table cellspacing="0" cellpadding="0">
  29. <tbody>
  30. <tr style="height: 56px;">
  31. <td id="projectalign" style="padding-left: 0.5em;">
  32. <div id="projectname">uTL
  33. </div>
  34. <div id="projectbrief">micro Template library</div>
  35. </td>
  36. </tr>
  37. </tbody>
  38. </table>
  39. </div>
  40. <!-- end header part -->
  41. <!-- Generated by Doxygen 1.8.14 -->
  42. <script type="text/javascript">
  43. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  44. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  45. /* @license-end */
  46. </script>
  47. <script type="text/javascript" src="menudata.js"></script>
  48. <script type="text/javascript" src="menu.js"></script>
  49. <script type="text/javascript">
  50. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  51. $(function() {
  52. initMenu('',true,false,'search.php','Search');
  53. $(document).ready(function() { init_search(); });
  54. });
  55. /* @license-end */</script>
  56. <div id="main-nav"></div>
  57. </div><!-- top -->
  58. <div id="side-nav" class="ui-resizable side-nav-resizable">
  59. <div id="nav-tree">
  60. <div id="nav-tree-contents">
  61. <div id="nav-sync" class="sync"></div>
  62. </div>
  63. </div>
  64. <div id="splitbar" style="-moz-user-select:none;"
  65. class="ui-resizable-handle">
  66. </div>
  67. </div>
  68. <script type="text/javascript">
  69. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  70. $(document).ready(function(){initNavTree('iterators_8h_source.html','');});
  71. /* @license-end */
  72. </script>
  73. <div id="doc-content">
  74. <!-- window showing the filter options -->
  75. <div id="MSearchSelectWindow"
  76. onmouseover="return searchBox.OnSearchSelectShow()"
  77. onmouseout="return searchBox.OnSearchSelectHide()"
  78. onkeydown="return searchBox.OnSearchSelectKey(event)">
  79. </div>
  80. <!-- iframe showing the search results (closed by default) -->
  81. <div id="MSearchResultsWindow">
  82. <iframe src="javascript:void(0)" frameborder="0"
  83. name="MSearchResults" id="MSearchResults">
  84. </iframe>
  85. </div>
  86. <div class="header">
  87. <div class="headertitle">
  88. <div class="title">iterators.h</div> </div>
  89. </div><!--header-->
  90. <div class="contents">
  91. <a href="iterators_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#ifndef __utl_concepts_iterator_h__</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#define __utl_concepts_iterator_h__</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="impl_8h.html">utl/core/impl.h</a>&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="defines_8h.html">utl/concepts/defines.h</a>&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="stl_8h.html">utl/concepts/stl.h</a>&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceutl.html">utl</a> {</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;<span class="preprocessor"> #if CXX_CONCEPTS</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">class</span> I&gt;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <a class="code" href="group__concepts.html#gaf81026787698cd63592563ab8223062b">_utlConcept</a> <a class="code" href="namespaceutl.html#a25b4f216e3d7754b1c7088dd59504dee">WeaklyIncrementable</a> =</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; Semiregular&lt;I&gt; &amp;&amp;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; requires(I i) {</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; { ++i } -&gt; Same&lt;I&gt;&amp;; <span class="comment">// not required to be equality preserving</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; i++; <span class="comment">// not required to be equality preserving</span></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="preprocessor"> #else</span></div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="namespaceutl_1_1detail.html"> 44</a></span>&#160; <span class="keyword">namespace </span>detail {</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="namespaceutl_1_1detail.html#a50e7a46f910a83190bca5a58f67f1e2d"> 45</a></span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">typename</span> I&gt; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1detail.html#a50e7a46f910a83190bca5a58f67f1e2d">try_ppI</a> = decltype (++(std::declval&lt;I&gt;()));</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="namespaceutl_1_1detail.html#a1371d13b3e8408cfc68e82b03ca9f3b0"> 46</a></span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">typename</span> I&gt; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1detail.html#a1371d13b3e8408cfc68e82b03ca9f3b0">try_Ipp</a> = decltype (std::declval&lt;I&gt;()++);</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="keyword">template</span> &lt;<span class="keyword">class</span> I&gt;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="namespaceutl.html#a25b4f216e3d7754b1c7088dd59504dee"> 49</a></span>&#160; <a class="code" href="group__concepts.html#gaf81026787698cd63592563ab8223062b">_utlConcept</a> <a class="code" href="namespaceutl.html#a25b4f216e3d7754b1c7088dd59504dee">WeaklyIncrementable</a> =</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; Semiregular&lt;I&gt;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; &amp;&amp; Same&lt;_ref_t&lt;I&gt;, <a class="code" href="namespaceutl_1_1meta.html#aa654a286b3bc8e6d8116ee1f57087110">meta::detected_t&lt;detail::try_ppI, _ref_t&lt;I&gt;</a>&gt;&gt;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; &amp;&amp; <a class="code" href="namespaceutl_1_1meta.html#a5329219a9d2f195421a78d8e07873507">meta::is_detected&lt;detail::try_Ipp, _ref_t&lt;I&gt;</a>&gt;::value;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="preprocessor"> #endif</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="preprocessor"> #if CXX_CONCEPTS</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">class</span> I&gt;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <a class="code" href="group__concepts.html#gaf81026787698cd63592563ab8223062b">_utlConcept</a> DeviceIterator =</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; requires(I i) {</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; { *i } -&gt; <span class="keyword">auto</span>&amp;&amp;; <span class="comment">// Requires: i is dereferenceable</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; } &amp;&amp;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; WeaklyIncrementable&lt;I&gt;;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="preprocessor"> #else</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="preprocessor"> #endif</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;}</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __utl_concepts_iterator_h__ */</span><span class="preprocessor"></span></div><div class="ttc" id="group__concepts_html_gaf81026787698cd63592563ab8223062b"><div class="ttname"><a href="group__concepts.html#gaf81026787698cd63592563ab8223062b">_utlConcept</a></div><div class="ttdeci">#define _utlConcept</div><div class="ttdoc">utl concept keyword syntax wrapper </div><div class="ttdef"><b>Definition:</b> <a href="defines_8h_source.html#l00056">defines.h:56</a></div></div>
  92. <div class="ttc" id="namespaceutl_html_a25b4f216e3d7754b1c7088dd59504dee"><div class="ttname"><a href="namespaceutl.html#a25b4f216e3d7754b1c7088dd59504dee">utl::WeaklyIncrementable</a></div><div class="ttdeci">_utlConcept WeaklyIncrementable</div><div class="ttdef"><b>Definition:</b> <a href="iterators_8h_source.html#l00049">iterators.h:49</a></div></div>
  93. <div class="ttc" id="stl_8h_html"><div class="ttname"><a href="stl_8h.html">stl.h</a></div><div class="ttdoc">STL&amp;#39;s Concepts. </div></div>
  94. <div class="ttc" id="defines_8h_html"><div class="ttname"><a href="defines_8h.html">defines.h</a></div><div class="ttdoc">Concepts defines. </div></div>
  95. <div class="ttc" id="namespaceutl_html"><div class="ttname"><a href="namespaceutl.html">utl</a></div><div class="ttdoc">STL&amp;#39;s core language concepts. </div><div class="ttdef"><b>Definition:</b> <a href="__1wire_8h_source.html#l00030">_1wire.h:30</a></div></div>
  96. <div class="ttc" id="namespaceutl_1_1meta_html_aa654a286b3bc8e6d8116ee1f57087110"><div class="ttname"><a href="namespaceutl_1_1meta.html#aa654a286b3bc8e6d8116ee1f57087110">utl::meta::detected_t</a></div><div class="ttdeci">eval&lt; detail::detector&lt; nat_, void, Op, Args... &gt; &gt; detected_t</div><div class="ttdef"><b>Definition:</b> <a href="detection_8h_source.html#l00146">detection.h:146</a></div></div>
  97. <div class="ttc" id="namespaceutl_1_1detail_html_a1371d13b3e8408cfc68e82b03ca9f3b0"><div class="ttname"><a href="namespaceutl_1_1detail.html#a1371d13b3e8408cfc68e82b03ca9f3b0">utl::detail::try_Ipp</a></div><div class="ttdeci">decltype(std::declval&lt; I &gt;()++) try_Ipp</div><div class="ttdef"><b>Definition:</b> <a href="iterators_8h_source.html#l00046">iterators.h:46</a></div></div>
  98. <div class="ttc" id="namespaceutl_1_1detail_html_a50e7a46f910a83190bca5a58f67f1e2d"><div class="ttname"><a href="namespaceutl_1_1detail.html#a50e7a46f910a83190bca5a58f67f1e2d">utl::detail::try_ppI</a></div><div class="ttdeci">decltype(++(std::declval&lt; I &gt;())) try_ppI</div><div class="ttdef"><b>Definition:</b> <a href="iterators_8h_source.html#l00045">iterators.h:45</a></div></div>
  99. <div class="ttc" id="namespaceutl_1_1meta_html_a5329219a9d2f195421a78d8e07873507"><div class="ttname"><a href="namespaceutl_1_1meta.html#a5329219a9d2f195421a78d8e07873507">utl::meta::is_detected</a></div><div class="ttdeci">typename detail::detector&lt; nat_, void, Op, Args... &gt;::detected is_detected</div><div class="ttdef"><b>Definition:</b> <a href="detection_8h_source.html#l00118">detection.h:118</a></div></div>
  100. <div class="ttc" id="impl_8h_html"><div class="ttname"><a href="impl_8h.html">impl.h</a></div><div class="ttdoc">Implementation detail main forward header. </div></div>
  101. </div><!-- fragment --></div><!-- contents -->
  102. </div><!-- doc-content -->
  103. <!-- start footer part -->
  104. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  105. <ul>
  106. <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_82754f54d9380477ef02477185c1f103.html">utl</a></li><li class="navelem"><a class="el" href="dir_1de759a74730efb26e16b92a33818a86.html">concepts</a></li><li class="navelem"><a class="el" href="iterators_8h.html">iterators.h</a></li>
  107. <li class="footer">Generated by
  108. <a href="http://www.doxygen.org/index.html">
  109. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  110. </ul>
  111. </div>
  112. </body>
  113. </html>