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.
 
 
 
 

111 lignes
8.0 KiB

  1. \hypertarget{meta_2invoke_8h}{}\section{include/utl/meta/invoke.h File Reference}
  2. \label{meta_2invoke_8h}\index{include/utl/meta/invoke.\+h@{include/utl/meta/invoke.\+h}}
  3. {\ttfamily \#include $<$utl/core/impl.\+h$>$}\newline
  4. {\ttfamily \#include $<$utl/meta/integral.\+h$>$}\newline
  5. {\ttfamily \#include $<$utl/meta/detection.\+h$>$}\newline
  6. {\ttfamily \#include $<$utl/meta/operations.\+h$>$}\newline
  7. \subsection*{Classes}
  8. \begin{DoxyCompactItemize}
  9. \item
  10. struct \mbox{\hyperlink{structutl_1_1meta_1_1identity}{utl\+::meta\+::identity$<$ \+\_\+\+Tp $>$}}
  11. \item
  12. struct \mbox{\hyperlink{structutl_1_1meta_1_1wrap}{utl\+::meta\+::wrap$<$ F $>$}}
  13. \item
  14. struct \mbox{\hyperlink{structutl_1_1meta_1_1wrap__i}{utl\+::meta\+::wrap\+\_\+i$<$ T, F $>$}}
  15. \begin{DoxyCompactList}\small\item\em Wrap a template {\ttfamily F} taking literal constants of type {\ttfamily T} into an Invokable. \end{DoxyCompactList}\item
  16. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1is__applicable__}{utl\+::meta\+::detail\+::is\+\_\+applicable\+\_\+$<$ F, T $>$}}
  17. \item
  18. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1is__applicable__q__}{utl\+::meta\+::detail\+::is\+\_\+applicable\+\_\+q\+\_\+$<$ F, T $>$}}
  19. \item
  20. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1is__applicable__i__}{utl\+::meta\+::detail\+::is\+\_\+applicable\+\_\+i\+\_\+$<$ T, F, Is $>$}}
  21. \item
  22. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1defer__}{utl\+::meta\+::detail\+::defer\+\_\+$<$ F, Ts $>$}}
  23. \item
  24. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1defer__i__}{utl\+::meta\+::detail\+::defer\+\_\+i\+\_\+$<$ T, F, Is $>$}}
  25. \item
  26. struct \mbox{\hyperlink{structutl_1_1meta_1_1quote}{utl\+::meta\+::quote$<$ F $>$}}
  27. \item
  28. struct \mbox{\hyperlink{structutl_1_1meta_1_1quote__i}{utl\+::meta\+::quote\+\_\+i$<$ T, F $>$}}
  29. \begin{DoxyCompactList}\small\item\em Wrap a template {\ttfamily F} taking literal constants of type {\ttfamily T} into an Invokable. \end{DoxyCompactList}\item
  30. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1compose__f__}{utl\+::meta\+::detail\+::compose\+\_\+f\+\_\+$<$ Fns $>$}}
  31. \item
  32. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1compose__f___3_01_fn0_00_01_fns_8_8_8_01_4}{utl\+::meta\+::detail\+::compose\+\_\+f\+\_\+$<$ Fn0, Fns... $>$}}
  33. \item
  34. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1compose__f___3_01_fn0_01_4}{utl\+::meta\+::detail\+::compose\+\_\+f\+\_\+$<$ Fn0 $>$}}
  35. \item
  36. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1compose__}{utl\+::meta\+::detail\+::compose\+\_\+$<$ Fns $>$}}
  37. \item
  38. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1compose___3_01_fn0_00_01_fns_8_8_8_01_4}{utl\+::meta\+::detail\+::compose\+\_\+$<$ Fn0, Fns... $>$}}
  39. \item
  40. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1compose___3_01_fn0_01_4}{utl\+::meta\+::detail\+::compose\+\_\+$<$ Fn0 $>$}}
  41. \item
  42. struct \mbox{\hyperlink{structutl_1_1meta_1_1bind__front}{utl\+::meta\+::bind\+\_\+front$<$ Fn, Ts $>$}}
  43. \item
  44. struct \mbox{\hyperlink{structutl_1_1meta_1_1bind__back}{utl\+::meta\+::bind\+\_\+back$<$ Fn, Ts $>$}}
  45. \item
  46. struct \mbox{\hyperlink{structutl_1_1meta_1_1same__as}{utl\+::meta\+::same\+\_\+as$<$ T1 $>$}}
  47. \item
  48. struct \mbox{\hyperlink{structutl_1_1meta_1_1same__as_1_1apply}{utl\+::meta\+::same\+\_\+as$<$ T1 $>$\+::apply$<$ T2 $>$}}
  49. \item
  50. struct \mbox{\hyperlink{structutl_1_1meta_1_1not__same__as}{utl\+::meta\+::not\+\_\+same\+\_\+as$<$ T1 $>$}}
  51. \item
  52. struct \mbox{\hyperlink{structutl_1_1meta_1_1not__same__as_1_1apply}{utl\+::meta\+::not\+\_\+same\+\_\+as$<$ T1 $>$\+::apply$<$ T2 $>$}}
  53. \end{DoxyCompactItemize}
  54. \subsection*{Namespaces}
  55. \begin{DoxyCompactItemize}
  56. \item
  57. \mbox{\hyperlink{namespaceutl}{utl}}
  58. \begin{DoxyCompactList}\small\item\em S\+TL\textquotesingle{}s core language concepts. \end{DoxyCompactList}\item
  59. \mbox{\hyperlink{namespaceutl_1_1meta}{utl\+::meta}}
  60. \item
  61. \mbox{\hyperlink{namespaceutl_1_1meta_1_1detail}{utl\+::meta\+::detail}}
  62. \end{DoxyCompactItemize}
  63. \subsection*{Typedefs}
  64. \begin{Indent}\textbf{ meta\+:\+:invoke}\par
  65. {\em A meta-\/programming \mbox{\hyperlink{namespaceutl_adc675874b5426194d04112f76b356714}{invoke()}} analogous. A {\ttfamily meta\+::invocable} shall contain a nested template type named {\bfseries apply} which is bind to actual invocable meta-\/function.
  66. \begin{DoxyItemize}
  67. \item We can use {\ttfamily wrap$<$$>$} or even better {\ttfamily quote$<$$>$} in order to wrap a metafunction to a type (metafunction class)
  68. \item We can pass these wrapped types to other metafunctions
  69. \item We can {\ttfamily invoke$<$$>$} the inner {\ttfamily apply} from a wrapped metafunction class.
  70. \end{DoxyItemize}}\begin{DoxyCompactItemize}
  71. \item
  72. {\footnotesize template$<$typename \+\_\+\+Tp $>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_a63c0b6b08f4c1d9bd3c4db7432e9b2af}{utl\+::meta\+::identity\+\_\+t}} = eval$<$ identity$<$ \+\_\+\+Tp $>$ $>$
  73. \begin{DoxyCompactList}\small\item\em identity type alias \end{DoxyCompactList}\end{DoxyCompactItemize}
  74. \end{Indent}
  75. \textbf{ }\par
  76. \begin{DoxyCompactItemize}
  77. \item
  78. {\footnotesize template$<$typename Fn , typename... Args$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_a77630cd8adc01f7193f6cb834313d90f}{utl\+::meta\+::invoke}} = typename Fn\+::template apply$<$ Args... $>$
  79. \item
  80. {\footnotesize template$<$typename Fn , typename... Args$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_ac27f3e5f3ec42921d9f8a6bb85560cf1}{utl\+::meta\+::invoke\+\_\+t}} = eval$<$ invoke$<$ Fn, Args... $>$ $>$
  81. \end{DoxyCompactItemize}
  82. \textbf{ }\par
  83. \begin{DoxyCompactItemize}
  84. \item
  85. {\footnotesize template$<$template$<$ typename... $>$ class F, typename... T$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_a695a94a2bbe51b0d0eec9bf82214d094}{utl\+::meta\+::is\+\_\+applicable\+\_\+t}} = eval$<$ detail\+::is\+\_\+applicable\+\_\+$<$ F, T... $>$ $>$
  86. \begin{DoxyCompactList}\small\item\em check if we can instantiate {\ttfamily F} with parameters {\ttfamily T} \end{DoxyCompactList}\item
  87. {\footnotesize template$<$typename Q , typename... T$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_a52c0afa73f63dc889e44cc6cc180f1f8}{utl\+::meta\+::is\+\_\+applicable\+\_\+qt}} = eval$<$ detail\+::is\+\_\+applicable\+\_\+q\+\_\+$<$ Q, T... $>$ $>$
  88. \begin{DoxyCompactList}\small\item\em check if we can invoke {\ttfamily Q} with parameters {\ttfamily T} \end{DoxyCompactList}\item
  89. {\footnotesize template$<$typename T , template$<$ T... $>$ class F, T... Is$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_add602488265f07c7a3080355350cda70}{utl\+::meta\+::is\+\_\+applicable\+\_\+it}} = eval$<$ detail\+::is\+\_\+applicable\+\_\+i\+\_\+$<$ T, F, Is... $>$ $>$
  90. \begin{DoxyCompactList}\small\item\em check if we can instantiate {\ttfamily F} with parameters {\ttfamily Is} of type {\ttfamily T} \end{DoxyCompactList}\end{DoxyCompactItemize}
  91. \textbf{ }\par
  92. \begin{DoxyCompactItemize}
  93. \item
  94. {\footnotesize template$<$template$<$ class... $>$ class F, class... Ts$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_a48f9a1220931596a9652351d2e7242be}{utl\+::meta\+::defer}} = if\+\_\+$<$ detail\+::is\+\_\+applicable\+\_\+$<$ F, Ts... $>$, detail\+::defer\+\_\+$<$ F, Ts... $>$, nil\+\_\+ $>$
  95. \begin{DoxyCompactList}\small\item\em defer alias template for F$<$\+Ts...$>$ \end{DoxyCompactList}\item
  96. {\footnotesize template$<$typename T , template$<$ T... $>$ class F, T... Is$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_a01f183f337439e414184beedc9bcf9e3}{utl\+::meta\+::defer\+\_\+i}} = if\+\_\+$<$ detail\+::is\+\_\+applicable\+\_\+i\+\_\+$<$ T, F, Is... $>$, detail\+::defer\+\_\+i\+\_\+$<$ T, F, Is... $>$, nil\+\_\+ $>$
  97. \begin{DoxyCompactList}\small\item\em defer\+\_\+i alias template for F$<$\+T, Is...$>$ \end{DoxyCompactList}\end{DoxyCompactItemize}
  98. \textbf{ }\par
  99. \begin{DoxyCompactItemize}
  100. \item
  101. {\footnotesize template$<$typename... Fns$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_a4f0c06cabe66bc73b703eb8509c7bb07}{utl\+::meta\+::compose}} = detail\+::compose\+\_\+$<$ Fns... $>$
  102. \item
  103. {\footnotesize template$<$template$<$ typename... $>$ class... Fns$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_a729294327829b3068632da1235dc3090}{utl\+::meta\+::compose\+\_\+f}} = detail\+::compose\+\_\+f\+\_\+$<$ Fns... $>$
  104. \end{DoxyCompactItemize}