|
- <!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/sfinae.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('sfinae_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">sfinae.h</div> </div>
- </div><!--header-->
- <div class="contents">
- <a href="sfinae_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_sfinae_h__</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#define __utl_meta_sfinae_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 <type_traits></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="l00037"></a><span class="lineno"> 37</span>  <span class="keyword">namespace </span>detail {</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment">// template <typename... T></span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// struct dev_null { using type = dev_null; }; //< Same as typelist</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="structutl_1_1meta_1_1detail_1_1when__.html"> 41</a></span>  <span class="keyword">template</span> <<span class="keywordtype">bool</span> If> <span class="keyword">struct </span><a class="code" href="structutl_1_1meta_1_1detail_1_1when__.html">when_</a> { };</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structutl_1_1meta_1_1detail_1_1when___3_01true_01_4.html#a2d6b156939c43f8236a109310733323c"> 42</a></span>  <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structutl_1_1meta_1_1detail_1_1when__.html">when_</a><true> { <span class="keyword">using</span> <a class="code" href="structutl_1_1meta_1_1detail_1_1when___3_01true_01_4.html#a2d6b156939c43f8236a109310733323c">type</a> = void; };</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  }</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keyword">template</span> <<span class="keywordtype">bool</span> If></div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="namespaceutl_1_1meta.html#a181d79db46b10170529e85b907ed3dc7"> 46</a></span>  <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1meta.html#a181d79db46b10170529e85b907ed3dc7">when</a> = <a class="code" href="namespaceutl_1_1meta.html#aa5a37adba244ff4286f994111c4c02ea">eval< detail::when_<If></a> >;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment">// //! Well formed only if all of \p Ifs are \c true</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment">// template <bool ...Ifs></span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment">// using when_all = detail::dev_null<</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment">// when<Ifs>...</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment">// >;</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="namespaceutl_1_1meta.html#ab3fed26a4c7a8204accb349f0b6600e8"> 60</a></span>  <span class="keyword">template</span> <<span class="keywordtype">bool</span> If, <span class="keyword">typename</span> _Tp = <span class="keywordtype">void</span>> <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1meta.html#ab3fed26a4c7a8204accb349f0b6600e8">enable_if</a> = std::enable_if<If, _Tp>;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01"> 63</a></span>  <span class="keyword">template</span><<span class="keywordtype">bool</span> If, <span class="keyword">typename</span> _Tp = <span class="keywordtype">void</span>> <span class="keyword">using</span> <a class="code" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">enable_if_t</a> = <a class="code" href="namespaceutl_1_1meta.html#aa5a37adba244ff4286f994111c4c02ea">eval< enable_if<If, _Tp></a> >;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> }}</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="preprocessor">#endif </span><span class="comment">/* __utl_meta_sfinae_h__ */</span><span class="preprocessor"></span></div><div class="ttc" id="structutl_1_1meta_1_1detail_1_1when___3_01true_01_4_html_a2d6b156939c43f8236a109310733323c"><div class="ttname"><a href="structutl_1_1meta_1_1detail_1_1when___3_01true_01_4.html#a2d6b156939c43f8236a109310733323c">utl::meta::detail::when_< true >::type</a></div><div class="ttdeci">void type</div><div class="ttdef"><b>Definition:</b> <a href="sfinae_8h_source.html#l00042">sfinae.h:42</a></div></div>
- <div class="ttc" id="namespaceutl_1_1meta_html_ab3fed26a4c7a8204accb349f0b6600e8"><div class="ttname"><a href="namespaceutl_1_1meta.html#ab3fed26a4c7a8204accb349f0b6600e8">utl::meta::enable_if</a></div><div class="ttdeci">std::enable_if< If, _Tp > enable_if</div><div class="ttdoc">enable_if, imported from stl </div><div class="ttdef"><b>Definition:</b> <a href="sfinae_8h_source.html#l00060">sfinae.h:60</a></div></div>
- <div class="ttc" id="structutl_1_1meta_1_1detail_1_1when___html"><div class="ttname"><a href="structutl_1_1meta_1_1detail_1_1when__.html">utl::meta::detail::when_</a></div><div class="ttdef"><b>Definition:</b> <a href="sfinae_8h_source.html#l00041">sfinae.h:41</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="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< enable_if< If, _Tp > > 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>
- <div class="ttc" id="namespaceutl_1_1meta_html_a181d79db46b10170529e85b907ed3dc7"><div class="ttname"><a href="namespaceutl_1_1meta.html#a181d79db46b10170529e85b907ed3dc7">utl::meta::when</a></div><div class="ttdeci">eval< detail::when_< If > > when</div><div class="ttdoc">Well formed only if If is true. </div><div class="ttdef"><b>Definition:</b> <a href="sfinae_8h_source.html#l00046">sfinae.h:46</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="sfinae_8h.html">sfinae.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>
|