|
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.14"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>uTL: include/utl/meta/selection.h Source File</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="navtree.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="resize.js"></script>
- <script type="text/javascript" src="navtreedata.js"></script>
- <script type="text/javascript" src="navtree.js"></script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(document).ready(initResizable);
- /* @license-end */</script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">uTL
- </div>
- <div id="projectbrief">micro Template library</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.14 -->
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- /* @license-end */
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- /* @license-end */</script>
- <div id="main-nav"></div>
- </div><!-- top -->
- <div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
- </div>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(document).ready(function(){initNavTree('selection_8h_source.html','');});
- /* @license-end */
- </script>
- <div id="doc-content">
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
-
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
-
- <div class="header">
- <div class="headertitle">
- <div class="title">selection.h</div> </div>
- </div><!--header-->
- <div class="contents">
- <a href="selection_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> </div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#ifndef __utl_meta_selection_h__</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#define __utl_meta_selection_h__</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <<a class="code" href="impl_8h.html">utl/core/impl.h</a>></span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <<a class="code" href="integral_8h.html">utl/meta/integral.h</a>></span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">namespace </span><a class="code" href="namespaceutl.html">utl</a> {</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">namespace </span>meta{</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keyword">namespace </span>detail {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keyword">template</span> <<span class="keywordtype">bool</span> If, <span class="keyword">typename</span>...></div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="structutl_1_1meta_1_1detail_1_1if__c__.html"> 44</a></span>  <span class="keyword">struct </span><a class="code" href="structutl_1_1meta_1_1detail_1_1if__c__.html">if_c_</a> {</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="group__type.html#gaefeff9de7bff8811e49692343ce6187e"> 45</a></span>  <span class="keyword">using</span> <a class="code" href="structutl_1_1meta_1_1nil__.html">type</a> = <a class="code" href="structutl_1_1meta_1_1nil__.html">nil_</a>; </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  };</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keyword">template</span><<span class="keyword">typename</span> Then></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="structutl_1_1meta_1_1detail_1_1if__c___3_01true_00_01_then_01_4.html"> 48</a></span>  <span class="keyword">struct </span><a class="code" href="structutl_1_1meta_1_1detail_1_1if__c___3_01true_00_01_then_01_4.html">if_c_<true, Then></a> {</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="group__type.html#gaa7f24607990e92d8263246fc5f7003b7"> 49</a></span>  <span class="keyword">using</span> <a class="code" href="group__type.html#gaa7f24607990e92d8263246fc5f7003b7">type</a> = Then;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  };</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keyword">template</span><<span class="keyword">typename</span> Then, <span class="keyword">typename</span> Else></div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structutl_1_1meta_1_1detail_1_1if__c___3_01true_00_01_then_00_01_else_01_4.html"> 52</a></span>  <span class="keyword">struct </span><a class="code" href="structutl_1_1meta_1_1detail_1_1if__c___3_01true_00_01_then_00_01_else_01_4.html">if_c_<true, Then, Else></a> {</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="group__type.html#ga15100ac40785819517c5defacb19915c"> 53</a></span>  <span class="keyword">using</span> <a class="code" href="group__type.html#ga15100ac40785819517c5defacb19915c">type</a> = Then;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  };</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keyword">template</span><<span class="keyword">typename</span> Then, <span class="keyword">typename</span> Else></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structutl_1_1meta_1_1detail_1_1if__c___3_01false_00_01_then_00_01_else_01_4.html"> 56</a></span>  <span class="keyword">struct </span><a class="code" href="structutl_1_1meta_1_1detail_1_1if__c___3_01false_00_01_then_00_01_else_01_4.html">if_c_<false, Then, Else></a> {</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="group__type.html#ga2fbed149992c081ac85eefaf63a388ca"> 57</a></span>  <span class="keyword">using</span> <a class="code" href="group__type.html#ga2fbed149992c081ac85eefaf63a388ca">type</a> = Else;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  };</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  }</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keyword">template</span> <<span class="keywordtype">bool</span> B, <span class="keyword">typename</span>... Args></div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="group__type.html#gaa3812817ce749832da73fdf5d2a85380"> 62</a></span>  <span class="keyword">using</span> <a class="code" href="group__type.html#gaa3812817ce749832da73fdf5d2a85380">if_c</a> = <a class="code" href="namespaceutl_1_1meta.html#aa5a37adba244ff4286f994111c4c02ea">eval</a><<a class="code" href="structutl_1_1meta_1_1detail_1_1if__c__.html">detail::if_c_</a><B, Args...>>;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> If, <span class="keyword">typename</span>... Args></div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="group__type.html#ga39cc4e727a8faa5ea176f543e62c05c0"> 66</a></span>  <span class="keyword">using</span> <a class="code" href="group__type.html#ga39cc4e727a8faa5ea176f543e62c05c0">if_</a> = <a class="code" href="group__type.html#gaa3812817ce749832da73fdf5d2a85380">if_c</a><If::type::value, Args...>;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="group__type.html#gaf7089523d21cd405c76985643f31092a"> 76</a></span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T1, <span class="keyword">typename</span> ...> <span class="keyword">using</span> <a class="code" href="group__type.html#gaf7089523d21cd405c76985643f31092a">first_of</a> = T1;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="group__type.html#ga422dd1b0895f0074ad9932d68d9edbc5"> 79</a></span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T1, <span class="keyword">typename</span> T2, <span class="keyword">typename</span> ...> <span class="keyword">using</span> <a class="code" href="group__type.html#ga422dd1b0895f0074ad9932d68d9edbc5">second_of</a> = T2;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> }}</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> </div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="preprocessor">#endif </span><span class="comment">/* __utl_meta_selection_h__ */</span><span class="preprocessor"></span></div><div class="ttc" id="group__type_html_gaf7089523d21cd405c76985643f31092a"><div class="ttname"><a href="group__type.html#gaf7089523d21cd405c76985643f31092a">utl::meta::first_of</a></div><div class="ttdeci">T1 first_of</div><div class="ttdoc">Select the first type of a type sequence. </div><div class="ttdef"><b>Definition:</b> <a href="selection_8h_source.html#l00076">selection.h:76</a></div></div>
- <div class="ttc" id="group__type_html_gaa7f24607990e92d8263246fc5f7003b7"><div class="ttname"><a href="group__type.html#gaa7f24607990e92d8263246fc5f7003b7">utl::meta::detail::if_c_< true, Then >::type</a></div><div class="ttdeci">Then type</div><div class="ttdef"><b>Definition:</b> <a href="selection_8h_source.html#l00049">selection.h:49</a></div></div>
- <div class="ttc" id="group__type_html_ga39cc4e727a8faa5ea176f543e62c05c0"><div class="ttname"><a href="group__type.html#ga39cc4e727a8faa5ea176f543e62c05c0">utl::meta::if_</a></div><div class="ttdeci">if_c< If::type::value, Args... > if_</div><div class="ttdoc">Select one type or another depending on a compile-time Boolean type. </div><div class="ttdef"><b>Definition:</b> <a href="selection_8h_source.html#l00066">selection.h:66</a></div></div>
- <div class="ttc" id="group__type_html_gaa3812817ce749832da73fdf5d2a85380"><div class="ttname"><a href="group__type.html#gaa3812817ce749832da73fdf5d2a85380">utl::meta::if_c</a></div><div class="ttdeci">eval< detail::if_c_< B, Args... > > if_c</div><div class="ttdoc">Select one type or another depending on a compile-time Boolean. </div><div class="ttdef"><b>Definition:</b> <a href="selection_8h_source.html#l00062">selection.h:62</a></div></div>
- <div class="ttc" id="group__type_html_ga422dd1b0895f0074ad9932d68d9edbc5"><div class="ttname"><a href="group__type.html#ga422dd1b0895f0074ad9932d68d9edbc5">utl::meta::second_of</a></div><div class="ttdeci">T2 second_of</div><div class="ttdoc">Select the second type of a type sequence. </div><div class="ttdef"><b>Definition:</b> <a href="selection_8h_source.html#l00079">selection.h:79</a></div></div>
- <div class="ttc" id="group__type_html_ga15100ac40785819517c5defacb19915c"><div class="ttname"><a href="group__type.html#ga15100ac40785819517c5defacb19915c">utl::meta::detail::if_c_< true, Then, Else >::type</a></div><div class="ttdeci">Then type</div><div class="ttdef"><b>Definition:</b> <a href="selection_8h_source.html#l00053">selection.h:53</a></div></div>
- <div class="ttc" id="structutl_1_1meta_1_1detail_1_1if__c___3_01true_00_01_then_00_01_else_01_4_html"><div class="ttname"><a href="structutl_1_1meta_1_1detail_1_1if__c___3_01true_00_01_then_00_01_else_01_4.html">utl::meta::detail::if_c_< true, Then, Else ></a></div><div class="ttdef"><b>Definition:</b> <a href="selection_8h_source.html#l00052">selection.h:52</a></div></div>
- <div class="ttc" id="structutl_1_1meta_1_1nil___html"><div class="ttname"><a href="structutl_1_1meta_1_1nil__.html">utl::meta::nil_</a></div><div class="ttdef"><b>Definition:</b> <a href="integral_8h_source.html#l00043">integral.h:43</a></div></div>
- <div class="ttc" id="group__type_html_ga2fbed149992c081ac85eefaf63a388ca"><div class="ttname"><a href="group__type.html#ga2fbed149992c081ac85eefaf63a388ca">utl::meta::detail::if_c_< false, Then, Else >::type</a></div><div class="ttdeci">Else type</div><div class="ttdef"><b>Definition:</b> <a href="selection_8h_source.html#l00057">selection.h:57</a></div></div>
- <div class="ttc" id="namespaceutl_1_1meta_html_aa5a37adba244ff4286f994111c4c02ea"><div class="ttname"><a href="namespaceutl_1_1meta.html#aa5a37adba244ff4286f994111c4c02ea">utl::meta::eval</a></div><div class="ttdeci">typename Tp::type eval</div><div class="ttdoc">Type alias for Tp::type. Used to evaluate/extract return type of metafunctions. </div><div class="ttdef"><b>Definition:</b> <a href="integral_8h_source.html#l00049">integral.h:49</a></div></div>
- <div class="ttc" id="namespaceutl_html"><div class="ttname"><a href="namespaceutl.html">utl</a></div><div class="ttdoc">STL&#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>
- <div class="ttc" id="structutl_1_1meta_1_1detail_1_1if__c___3_01true_00_01_then_01_4_html"><div class="ttname"><a href="structutl_1_1meta_1_1detail_1_1if__c___3_01true_00_01_then_01_4.html">utl::meta::detail::if_c_< true, Then ></a></div><div class="ttdef"><b>Definition:</b> <a href="selection_8h_source.html#l00048">selection.h:48</a></div></div>
- <div class="ttc" id="integral_8h_html"><div class="ttname"><a href="integral_8h.html">integral.h</a></div></div>
- <div class="ttc" id="structutl_1_1meta_1_1detail_1_1if__c___3_01false_00_01_then_00_01_else_01_4_html"><div class="ttname"><a href="structutl_1_1meta_1_1detail_1_1if__c___3_01false_00_01_then_00_01_else_01_4.html">utl::meta::detail::if_c_< false, Then, Else ></a></div><div class="ttdef"><b>Definition:</b> <a href="selection_8h_source.html#l00056">selection.h:56</a></div></div>
- <div class="ttc" id="structutl_1_1meta_1_1detail_1_1if__c___html"><div class="ttname"><a href="structutl_1_1meta_1_1detail_1_1if__c__.html">utl::meta::detail::if_c_</a></div><div class="ttdef"><b>Definition:</b> <a href="selection_8h_source.html#l00044">selection.h:44</a></div></div>
- <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>
- </div><!-- fragment --></div><!-- contents -->
- </div><!-- doc-content -->
- <!-- start footer part -->
- <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <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="selection_8h.html">selection.h</a></li>
- <li class="footer">Generated by
- <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
- </ul>
- </div>
- </body>
- </html>
|