|
- <!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/utility/invoke.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('utility_2invoke_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">invoke.h</div> </div>
- </div><!--header-->
- <div class="contents">
- <a href="utility_2invoke_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_utility_invoke_h__</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#define __utl_utility_invoke_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="meta_8h.html">utl/meta/meta.h</a>></span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <type_traits></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <functional></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <utility></span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">namespace </span><a class="code" href="namespaceutl.html">utl</a> {</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</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> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keyword">template</span> <<span class="keyword">class</span> T></div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="structutl_1_1detail_1_1is__ref__wrapper.html"> 40</a></span>  <span class="keyword">struct </span><a class="code" href="structutl_1_1detail_1_1is__ref__wrapper.html">is_ref_wrapper</a> : <a class="code" href="namespaceutl_1_1meta.html#a55511dbaa0adb605ce22dcec11f8d22d">meta::false_</a> {};</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keyword">template</span> <<span class="keyword">class</span> U></div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structutl_1_1detail_1_1is__ref__wrapper_3_01std_1_1reference__wrapper_3_01_u_01_4_01_4.html"> 42</a></span>  <span class="keyword">struct </span><a class="code" href="structutl_1_1detail_1_1is__ref__wrapper.html">is_ref_wrapper</a><<a class="code" href="namespacestd.html">std</a>::reference_wrapper<U>> : <a class="code" href="namespaceutl_1_1meta.html#ae9a5a8fbe8202785f059935af219fb97">meta::true_</a> {};</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="comment">// 1</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keyword">template</span> <<span class="keyword">class </span>T, <span class="keyword">class </span>Type, <span class="keyword">class </span>T1, <span class="keyword">class</span>... Args,</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">meta::enable_if_t</a><</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  std::is_member_function_pointer<std::decay_t<Type T::*>>::value &&</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  std::is_base_of<T, std::decay_t<T1>>::value,</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordtype">int</span>> =0</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  ></div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="namespaceutl_1_1detail.html#a2c39a67272ada5da5f1b84115dadc4a1"> 51</a></span>  decltype(<span class="keyword">auto</span>) <a class="code" href="namespaceutl_1_1detail.html#a2c39a67272ada5da5f1b84115dadc4a1">invoke_impl_</a>(Type T::* f, T1&& t1, Args&&... args) {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordflow">return</span> (std::forward<T1>(t1).*f)(std::forward<Args>(args)...);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  }</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="comment">// 2</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keyword">template</span> <<span class="keyword">class </span>T, <span class="keyword">class </span>Type, <span class="keyword">class </span>T1, <span class="keyword">class</span>... Args,</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="code" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">meta::enable_if_t</a><</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  std::is_member_function_pointer<std::decay_t<Type T::*>>::value &&</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  is_ref_wrapper<std::decay_t<T1>>::value,</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordtype">int</span>> =0</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  ></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  decltype(<span class="keyword">auto</span>) <a class="code" href="namespaceutl_1_1detail.html#a2c39a67272ada5da5f1b84115dadc4a1">invoke_impl_</a>(Type T::* f, T1&& t1, Args&&... args) {</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordflow">return</span> (t1.get().*f)(std::forward<Args>(args)...);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  }</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="comment">// 3</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keyword">template</span> <<span class="keyword">class </span>T, <span class="keyword">class </span>Type, <span class="keyword">class </span>T1, <span class="keyword">class</span>... Args,</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <a class="code" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">meta::enable_if_t</a><</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  std::is_member_function_pointer<std::decay_t<Type T::*>>::value &&</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  !std::is_base_of<T, std::decay_t<T1>>::value &&</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  !is_ref_wrapper<std::decay_t<T1>>::value,</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordtype">int</span>> =0</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  ></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  decltype(<span class="keyword">auto</span>) <a class="code" href="namespaceutl_1_1detail.html#a2c39a67272ada5da5f1b84115dadc4a1">invoke_impl_</a>(Type T::* f, T1&& t1, Args&&... args) {</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">return</span> ((*std::forward<T1>(t1)).*f)(std::forward<Args>(args)...);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  }</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="comment">// 4</span></div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keyword">template</span> <<span class="keyword">class </span>T, <span class="keyword">class </span>Type, <span class="keyword">class </span>T1, <span class="keyword">class</span>... Args,</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <a class="code" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">meta::enable_if_t</a><</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  std::is_member_object_pointer<std::decay_t<Type T::*>>::value &&</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  std::is_base_of<T, std::decay_t<T1>>::value,</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordtype">int</span>> =0</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  ></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  decltype(<span class="keyword">auto</span>) <a class="code" href="namespaceutl_1_1detail.html#a2c39a67272ada5da5f1b84115dadc4a1">invoke_impl_</a>(Type T::* f, T1&& t1, Args&&... args) {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">return</span> std::forward<T1>(t1).*f;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  }</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> </div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="comment">// 5</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keyword">template</span> <<span class="keyword">class </span>T, <span class="keyword">class </span>Type, <span class="keyword">class </span>T1, <span class="keyword">class</span>... Args,</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <a class="code" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">meta::enable_if_t</a><</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  std::is_member_object_pointer<std::decay_t<Type T::*>>::value &&</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  is_ref_wrapper<std::decay_t<T1>>::value,</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordtype">int</span>> =0</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  ></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  decltype(<span class="keyword">auto</span>) <a class="code" href="namespaceutl_1_1detail.html#a2c39a67272ada5da5f1b84115dadc4a1">invoke_impl_</a>(Type T::* f, T1&& t1, Args&&... args) {</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">return</span> t1.get().*f;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  }</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="comment">// 6</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keyword">template</span> <<span class="keyword">class </span>T, <span class="keyword">class </span>Type, <span class="keyword">class </span>T1, <span class="keyword">class</span>... Args,</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <a class="code" href="namespaceutl_1_1meta.html#a372fe391d9567f66a81091f581e1fa01">meta::enable_if_t</a><</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  std::is_member_object_pointer<std::decay_t<Type T::*>>::value &&</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  !std::is_base_of<T, std::decay_t<T1>>::value &&</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  !is_ref_wrapper<std::decay_t<T1>>::value,</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordtype">int</span>> =0</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  ></div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  decltype(<span class="keyword">auto</span>) <a class="code" href="namespaceutl_1_1detail.html#a2c39a67272ada5da5f1b84115dadc4a1">invoke_impl_</a>(Type T::* f, T1&& t1, Args&&... args) {</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">return</span> (*std::forward<T1>(t1)).*f;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  }</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keyword">template</span> <<span class="keyword">class </span>F, <span class="keyword">class</span>... Args></div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="namespaceutl_1_1detail.html#a09341831ecc9aab67a23d3a47b2d114f"> 113</a></span>  decltype(<span class="keyword">auto</span>) <a class="code" href="namespaceutl_1_1detail.html#a2c39a67272ada5da5f1b84115dadc4a1">invoke_impl_</a>(F&& f, Args&&... args) {</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">return</span> std::forward<F>(f)(std::forward<Args>(args)...);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  }</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  } <span class="comment">// namespace detail</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keyword">template</span><<span class="keyword">typename</span> _Callable, <span class="keyword">typename</span>... _Args></div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="namespaceutl.html#adc675874b5426194d04112f76b356714"> 121</a></span>  <span class="keyword">inline</span> decltype(<span class="keyword">auto</span>) <a class="code" href="namespaceutl.html#adc675874b5426194d04112f76b356714">invoke</a>(_Callable&& fn, _Args&&... args) {</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceutl_1_1detail.html#a2c39a67272ada5da5f1b84115dadc4a1">detail::invoke_impl_</a>(</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  std::forward<_Callable>(fn), std::forward<_Args>(args)...</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  );</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  }</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> </div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> F, <span class="keyword">typename</span>... Args></div><div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="structutl_1_1is__invocable.html"> 130</a></span>  <span class="keyword">struct </span><a class="code" href="structutl_1_1is__invocable.html">is_invocable</a> :</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  std::is_constructible<</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  std::function<void(Args ...)>,</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  std::reference_wrapper<typename std::remove_reference<F>::type></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  > { };</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> R, <span class="keyword">typename</span> F, <span class="keyword">typename</span>... Args></div><div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="structutl_1_1is__invocable__r.html"> 138</a></span>  <span class="keyword">struct </span><a class="code" href="structutl_1_1is__invocable__r.html">is_invocable_r</a> :</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  std::is_constructible<</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  std::function<R(Args ...)>,</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  std::reference_wrapper<typename std::remove_reference<F>::type></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  > { };</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> </div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keyword">namespace </span>detail {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keyword">template</span><<span class="keyword">typename</span> _Callable, <span class="keyword">typename</span>... _Args></div><div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="structutl_1_1detail_1_1try__invoke.html"> 150</a></span>  <span class="keyword">struct </span><a class="code" href="structutl_1_1detail_1_1try__invoke.html">try_invoke</a> {</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keyword">using</span> <a class="code" href="structutl_1_1detail_1_1try__invoke.html#a23491c600d42090f3eb400eadc49ef7f">type</a> = decltype (</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <a class="code" href="namespaceutl_1_1detail.html#a2c39a67272ada5da5f1b84115dadc4a1">detail::invoke_impl_</a>(std::declval<_Callable&&>(), std::declval<_Args&&>()...)</div><div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="structutl_1_1detail_1_1try__invoke.html#a23491c600d42090f3eb400eadc49ef7f"> 153</a></span>  );</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  };</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> </div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keyword">template</span><<span class="keywordtype">bool</span> B, <span class="keyword">typename</span> _Callable, <span class="keyword">typename</span>... _Args></div><div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="structutl_1_1detail_1_1invoke__result__.html"> 157</a></span>  <span class="keyword">struct </span><a class="code" href="structutl_1_1detail_1_1invoke__result__.html">invoke_result_</a> {</div><div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="structutl_1_1detail_1_1invoke__result__.html#a03e0ac5bf1e7751812af8828eb6550b3"> 158</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">meta::nil_</a>;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  };</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> </div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> _Callable, <span class="keyword">typename</span>... _Args></div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="structutl_1_1detail_1_1invoke__result___3_01true_00_01___callable_00_01___args_8_8_8_01_4.html"> 162</a></span>  <span class="keyword">struct </span><a class="code" href="structutl_1_1detail_1_1invoke__result__.html">invoke_result_</a> <true, _Callable, _Args...> {</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keyword">using</span> <a class="code" href="structutl_1_1detail_1_1invoke__result___3_01true_00_01___callable_00_01___args_8_8_8_01_4.html#af68f2e0441486139aab41a8d5e74b35a">type</a> = <a class="code" href="namespaceutl_1_1meta.html#ac27f3e5f3ec42921d9f8a6bb85560cf1">meta::invoke_t</a><</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="structutl_1_1meta_1_1quote.html">meta::quote<try_invoke></a>, _Callable, _Args...</div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="structutl_1_1detail_1_1invoke__result___3_01true_00_01___callable_00_01___args_8_8_8_01_4.html#af68f2e0441486139aab41a8d5e74b35a"> 165</a></span>  >;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  };</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  }</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> _Callable, <span class="keyword">typename</span>... _Args></div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keyword">using</span> <a class="code" href="structutl_1_1detail_1_1invoke__result__.html">invoke_result</a> = <a class="code" href="structutl_1_1detail_1_1invoke__result__.html">detail::invoke_result_</a><</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <a class="code" href="structutl_1_1is__invocable.html">is_invocable</a><_Callable, _Args...>::value,</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  _Callable,</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  _Args...</div><div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="namespaceutl.html#a9dd560a1b217a10af34d1ade3e77a76b"> 174</a></span>  >;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keyword">template</span><<span class="keyword">typename</span> _Callable, <span class="keyword">typename</span>... _Args></div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keyword">using</span> <a class="code" href="namespaceutl.html#ae40494acc30f2894c74544f3e9142933">invoke_result_t</a> = <a class="code" href="namespaceutl_1_1meta.html#aa5a37adba244ff4286f994111c4c02ea">meta::eval</a> <</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <a class="code" href="structutl_1_1detail_1_1invoke__result__.html">invoke_result</a><_Callable, _Args...></div><div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="namespaceutl.html#ae40494acc30f2894c74544f3e9142933"> 180</a></span>  >;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span> }</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> </div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> </div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span> <span class="preprocessor">#endif </span><span class="comment">/* __utl_utility_invoke_h__ */</span><span class="preprocessor"></span></div><div class="ttc" id="namespaceutl_1_1detail_html_a2c39a67272ada5da5f1b84115dadc4a1"><div class="ttname"><a href="namespaceutl_1_1detail.html#a2c39a67272ada5da5f1b84115dadc4a1">utl::detail::invoke_impl_</a></div><div class="ttdeci">decltype(auto) invoke_impl_(Type T::*f, T1 &&t1, Args &&... args)</div><div class="ttdef"><b>Definition:</b> <a href="utility_2invoke_8h_source.html#l00051">invoke.h:51</a></div></div>
- <div class="ttc" id="structutl_1_1detail_1_1invoke__result___html"><div class="ttname"><a href="structutl_1_1detail_1_1invoke__result__.html">utl::detail::invoke_result_</a></div><div class="ttdef"><b>Definition:</b> <a href="utility_2invoke_8h_source.html#l00157">invoke.h:157</a></div></div>
- <div class="ttc" id="meta_8h_html"><div class="ttname"><a href="meta_8h.html">meta.h</a></div><div class="ttdoc">Include all meta library. </div></div>
- <div class="ttc" id="namespaceutl_html_adc675874b5426194d04112f76b356714"><div class="ttname"><a href="namespaceutl.html#adc675874b5426194d04112f76b356714">utl::invoke</a></div><div class="ttdeci">decltype(auto) invoke(_Callable &&fn, _Args &&... args)</div><div class="ttdoc">Invoke a callable object (for C++14) </div><div class="ttdef"><b>Definition:</b> <a href="utility_2invoke_8h_source.html#l00121">invoke.h:121</a></div></div>
- <div class="ttc" id="structutl_1_1meta_1_1quote_html"><div class="ttname"><a href="structutl_1_1meta_1_1quote.html">utl::meta::quote</a></div><div class="ttdef"><b>Definition:</b> <a href="meta_2invoke_8h_source.html#l00234">invoke.h:234</a></div></div>
- <div class="ttc" id="namespaceutl_1_1meta_html_ae9a5a8fbe8202785f059935af219fb97"><div class="ttname"><a href="namespaceutl_1_1meta.html#ae9a5a8fbe8202785f059935af219fb97">utl::meta::true_</a></div><div class="ttdeci">bool_< true > true_</div><div class="ttdoc">The type used as a compile-time boolean with true value. </div><div class="ttdef"><b>Definition:</b> <a href="integral_8h_source.html#l00068">integral.h:68</a></div></div>
- <div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdoc">STL namespace. </div></div>
- <div class="ttc" id="structutl_1_1detail_1_1invoke__result___3_01true_00_01___callable_00_01___args_8_8_8_01_4_html_af68f2e0441486139aab41a8d5e74b35a"><div class="ttname"><a href="structutl_1_1detail_1_1invoke__result___3_01true_00_01___callable_00_01___args_8_8_8_01_4.html#af68f2e0441486139aab41a8d5e74b35a">utl::detail::invoke_result_< true, _Callable, _Args... >::type</a></div><div class="ttdeci">meta::invoke_t< meta::quote< try_invoke >, _Callable, _Args... > type</div><div class="ttdef"><b>Definition:</b> <a href="utility_2invoke_8h_source.html#l00165">invoke.h:165</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="structutl_1_1detail_1_1is__ref__wrapper_html"><div class="ttname"><a href="structutl_1_1detail_1_1is__ref__wrapper.html">utl::detail::is_ref_wrapper</a></div><div class="ttdef"><b>Definition:</b> <a href="utility_2invoke_8h_source.html#l00040">invoke.h:40</a></div></div>
- <div class="ttc" id="namespaceutl_1_1meta_html_a55511dbaa0adb605ce22dcec11f8d22d"><div class="ttname"><a href="namespaceutl_1_1meta.html#a55511dbaa0adb605ce22dcec11f8d22d">utl::meta::false_</a></div><div class="ttdeci">bool_< false > false_</div><div class="ttdoc">The type used as a compile-time boolean with false value. </div><div class="ttdef"><b>Definition:</b> <a href="integral_8h_source.html#l00069">integral.h:69</a></div></div>
- <div class="ttc" id="structutl_1_1detail_1_1try__invoke_html"><div class="ttname"><a href="structutl_1_1detail_1_1try__invoke.html">utl::detail::try_invoke</a></div><div class="ttdef"><b>Definition:</b> <a href="utility_2invoke_8h_source.html#l00150">invoke.h:150</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_html_ae40494acc30f2894c74544f3e9142933"><div class="ttname"><a href="namespaceutl.html#ae40494acc30f2894c74544f3e9142933">utl::invoke_result_t</a></div><div class="ttdeci">meta::eval< invoke_result< _Callable, _Args... > > invoke_result_t</div><div class="ttdoc">invoke_result_t (for C++14) </div><div class="ttdef"><b>Definition:</b> <a href="utility_2invoke_8h_source.html#l00180">invoke.h:180</a></div></div>
- <div class="ttc" id="structutl_1_1is__invocable__r_html"><div class="ttname"><a href="structutl_1_1is__invocable__r.html">utl::is_invocable_r</a></div><div class="ttdoc">std::is_invocable_r trait for C++11 </div><div class="ttdef"><b>Definition:</b> <a href="utility_2invoke_8h_source.html#l00138">invoke.h:138</a></div></div>
- <div class="ttc" id="structutl_1_1detail_1_1try__invoke_html_a23491c600d42090f3eb400eadc49ef7f"><div class="ttname"><a href="structutl_1_1detail_1_1try__invoke.html#a23491c600d42090f3eb400eadc49ef7f">utl::detail::try_invoke::type</a></div><div class="ttdeci">decltype(detail::invoke_impl_(std::declval< _Callable && >(), std::declval< _Args && >()...)) type</div><div class="ttdef"><b>Definition:</b> <a href="utility_2invoke_8h_source.html#l00153">invoke.h:153</a></div></div>
- <div class="ttc" id="namespaceutl_1_1meta_html_ac27f3e5f3ec42921d9f8a6bb85560cf1"><div class="ttname"><a href="namespaceutl_1_1meta.html#ac27f3e5f3ec42921d9f8a6bb85560cf1">utl::meta::invoke_t</a></div><div class="ttdeci">eval< invoke< Fn, Args... > > invoke_t</div><div class="ttdef"><b>Definition:</b> <a href="meta_2invoke_8h_source.html#l00088">invoke.h:88</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 class="ttc" id="structutl_1_1is__invocable_html"><div class="ttname"><a href="structutl_1_1is__invocable.html">utl::is_invocable</a></div><div class="ttdoc">std::is_invocable trait for C++11 </div><div class="ttdef"><b>Definition:</b> <a href="utility_2invoke_8h_source.html#l00130">invoke.h:130</a></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_cd2b5ca7f5fdf6a80655358f064ed410.html">utility</a></li><li class="navelem"><a class="el" href="utility_2invoke_8h.html">invoke.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>
|