Micro template library A library for building device drivers
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

118 lignes
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/meta/useif.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('useif_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">useif.h</div> </div>
  89. </div><!--header-->
  90. <div class="contents">
  91. <a href="useif_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="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#ifndef __utl_meta_useif_h__</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#define __utl_meta_useif_h__</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</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="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="operations_8h.html">utl/meta/operations.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="sfinae_8h.html">utl/meta/sfinae.h</a>&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</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;<span class="keyword">namespace </span>meta {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">typename</span> _T1, <span class="keyword">typename</span> _T2, <span class="keyword">typename</span> _Ret =_T1&gt;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1meta.html#a7b4ba22b3afb3e7a98e1012a350cb573">use_if_same_t</a> = <a class="code" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">enable_if_t</a>&lt;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; same_&lt;_T1, _T2&gt;::value, _Ret</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="namespaceutl_1_1meta.html#a7b4ba22b3afb3e7a98e1012a350cb573"> 40</a></span>&#160; &gt;;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">typename</span> _T1, <span class="keyword">typename</span> _T2, <span class="keyword">typename</span> _Ret =_T1&gt;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1meta.html#af590469269a8c378d937d8d75ee96e8c">use_if_not_same_t</a> = <a class="code" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">enable_if_t</a>&lt;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; !<a class="code" href="structutl_1_1meta_1_1same__.html">same_&lt;_T1, _T2&gt;::value</a>, _Ret</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="namespaceutl_1_1meta.html#af590469269a8c378d937d8d75ee96e8c"> 45</a></span>&#160; &gt;;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T1, <span class="keyword">typename</span>... Ts&gt;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1meta.html#ad0394846551cd881782e46d2d05190de">use_if_any_t</a> = <a class="code" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">enable_if_t</a>&lt;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <a class="code" href="group__integral.html#gac43f400cc93d54f5f79892e618069d9b">or_</a>&lt;T1, Ts...&gt;::value, T1</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="namespaceutl_1_1meta.html#ad0394846551cd881782e46d2d05190de"> 50</a></span>&#160; &gt;;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T1, <span class="keyword">typename</span>... Ts&gt;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1meta.html#a52ff6257bf079904f9cb51a65f5a7397">use_if_all_t</a> = <a class="code" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">enable_if_t</a>&lt;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <a class="code" href="group__integral.html#ga8e82f4758321e0e0b3705607f7d8e068">and_</a>&lt;T1, Ts...&gt;::value, T1</div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="namespaceutl_1_1meta.html#a52ff6257bf079904f9cb51a65f5a7397"> 56</a></span>&#160; &gt;;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;}}</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __utl_meta_useif_h__ */</span><span class="preprocessor"></span></div><div class="ttc" id="namespaceutl_1_1meta_html_a7b4ba22b3afb3e7a98e1012a350cb573"><div class="ttname"><a href="namespaceutl_1_1meta.html#a7b4ba22b3afb3e7a98e1012a350cb573">utl::meta::use_if_same_t</a></div><div class="ttdeci">enable_if_t&lt; same_&lt; _T1, _T2 &gt;::value, _Ret &gt; use_if_same_t</div><div class="ttdoc">If same type resolves to _Ret, else SFINAE. </div><div class="ttdef"><b>Definition:</b> <a href="useif_8h_source.html#l00040">useif.h:40</a></div></div>
  92. <div class="ttc" id="namespaceutl_1_1meta_html_af590469269a8c378d937d8d75ee96e8c"><div class="ttname"><a href="namespaceutl_1_1meta.html#af590469269a8c378d937d8d75ee96e8c">utl::meta::use_if_not_same_t</a></div><div class="ttdeci">enable_if_t&lt; !same_&lt; _T1, _T2 &gt;::value, _Ret &gt; use_if_not_same_t</div><div class="ttdoc">If not same type resolves to _Ret, else SFINAE. </div><div class="ttdef"><b>Definition:</b> <a href="useif_8h_source.html#l00045">useif.h:45</a></div></div>
  93. <div class="ttc" id="operations_8h_html"><div class="ttname"><a href="operations_8h.html">operations.h</a></div><div class="ttdoc">Integral constant operations and logical operations. </div></div>
  94. <div class="ttc" id="namespaceutl_1_1meta_html_a52ff6257bf079904f9cb51a65f5a7397"><div class="ttname"><a href="namespaceutl_1_1meta.html#a52ff6257bf079904f9cb51a65f5a7397">utl::meta::use_if_all_t</a></div><div class="ttdeci">enable_if_t&lt; and_&lt; T1, Ts... &gt;::value, T1 &gt; use_if_all_t</div><div class="ttdoc">If both type (_T1 and _T2) type resolves to _Ret, else to SFINAE. </div><div class="ttdef"><b>Definition:</b> <a href="useif_8h_source.html#l00056">useif.h:56</a></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="structutl_1_1meta_1_1same___html"><div class="ttname"><a href="structutl_1_1meta_1_1same__.html">utl::meta::same_</a></div><div class="ttdef"><b>Definition:</b> <a href="operations_8h_source.html#l00102">operations.h:102</a></div></div>
  97. <div class="ttc" id="sfinae_8h_html"><div class="ttname"><a href="sfinae_8h.html">sfinae.h</a></div><div class="ttdoc">Template meta-programming SFINAE helpers. </div></div>
  98. <div class="ttc" id="namespaceutl_1_1meta_html_a372fe391d9567f66a81091f581e1fa01"><div class="ttname"><a href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">utl::meta::enable_if_t</a></div><div class="ttdeci">eval&lt; enable_if&lt; If, _Tp &gt; &gt; enable_if_t</div><div class="ttdoc">alias template for enable_if </div><div class="ttdef"><b>Definition:</b> <a href="sfinae_8h_source.html#l00063">sfinae.h:63</a></div></div>
  99. <div class="ttc" id="group__integral_html_gac43f400cc93d54f5f79892e618069d9b"><div class="ttname"><a href="group__integral.html#gac43f400cc93d54f5f79892e618069d9b">utl::meta::or_</a></div><div class="ttdeci">eval&lt; detail::_or_&lt; _Ts... &gt; &gt; or_</div><div class="ttdef"><b>Definition:</b> <a href="operations_8h_source.html#l00070">operations.h:70</a></div></div>
  100. <div class="ttc" id="group__integral_html_ga8e82f4758321e0e0b3705607f7d8e068"><div class="ttname"><a href="group__integral.html#ga8e82f4758321e0e0b3705607f7d8e068">utl::meta::and_</a></div><div class="ttdeci">eval&lt; detail::_and_&lt; _Ts... &gt; &gt; and_</div><div class="ttdef"><b>Definition:</b> <a href="operations_8h_source.html#l00096">operations.h:96</a></div></div>
  101. <div class="ttc" id="namespaceutl_1_1meta_html_ad0394846551cd881782e46d2d05190de"><div class="ttname"><a href="namespaceutl_1_1meta.html#ad0394846551cd881782e46d2d05190de">utl::meta::use_if_any_t</a></div><div class="ttdeci">enable_if_t&lt; or_&lt; T1, Ts... &gt;::value, T1 &gt; use_if_any_t</div><div class="ttdoc">If any type (_T1 or _T2) type resolves to _Ret, else to SFINAE. </div><div class="ttdef"><b>Definition:</b> <a href="useif_8h_source.html#l00050">useif.h:50</a></div></div>
  102. <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>
  103. </div><!-- fragment --></div><!-- contents -->
  104. </div><!-- doc-content -->
  105. <!-- start footer part -->
  106. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  107. <ul>
  108. <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_c6a55aeb35dd92d90cdd3b5869981960.html">meta</a></li><li class="navelem"><a class="el" href="useif_8h.html">useif.h</a></li>
  109. <li class="footer">Generated by
  110. <a href="http://www.doxygen.org/index.html">
  111. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  112. </ul>
  113. </div>
  114. </body>
  115. </html>