Micro template library A library for building device drivers
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

71 řádky
6.0 KiB

  1. \hypertarget{detection_8h}{}\section{include/utl/meta/detection.h File Reference}
  2. \label{detection_8h}\index{include/utl/meta/detection.\+h@{include/utl/meta/detection.\+h}}
  3. Detection idiom based on W\+G21\textquotesingle{}s N4502 \mbox{[}\mbox{\hyperlink{detection_8h_n4502}{n4502}} 1\mbox{]} from Walter E. Brown.
  4. {\ttfamily \#include $<$utl/core/impl.\+h$>$}\newline
  5. {\ttfamily \#include $<$utl/meta/operations.\+h$>$}\newline
  6. {\ttfamily \#include $<$type\+\_\+traits$>$}\newline
  7. \subsection*{Classes}
  8. \begin{DoxyCompactItemize}
  9. \item
  10. struct \mbox{\hyperlink{structutl_1_1meta_1_1nat__}{utl\+::meta\+::nat\+\_\+}}
  11. \item
  12. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1detector}{utl\+::meta\+::detail\+::detector$<$ Default, Always\+Void, Op, Args $>$}}
  13. \item
  14. struct \mbox{\hyperlink{structutl_1_1meta_1_1detail_1_1detector_3_01_default_00_01void__t_3_01_op_3_01_args_8_8_8_01_4_0c35bdbd19f56980c0b5ee6d490bfb634}{utl\+::meta\+::detail\+::detector$<$ Default, void\+\_\+t$<$ Op$<$ Args... $>$ $>$, Op, Args... $>$}}
  15. \end{DoxyCompactItemize}
  16. \subsection*{Namespaces}
  17. \begin{DoxyCompactItemize}
  18. \item
  19. \mbox{\hyperlink{namespaceutl}{utl}}
  20. \begin{DoxyCompactList}\small\item\em S\+TL\textquotesingle{}s core language concepts. \end{DoxyCompactList}\item
  21. \mbox{\hyperlink{namespaceutl_1_1meta}{utl\+::meta}}
  22. \item
  23. \mbox{\hyperlink{namespaceutl_1_1meta_1_1detail}{utl\+::meta\+::detail}}
  24. \end{DoxyCompactItemize}
  25. \subsection*{Typedefs}
  26. \begin{DoxyCompactItemize}
  27. \item
  28. {\footnotesize template$<$typename... $>$ }\\using \mbox{\hyperlink{group__detection_gac16d50de47cf57734433e9ea636522c5}{utl\+::meta\+::void\+\_\+}} = void
  29. \begin{DoxyCompactList}\small\item\em void\+\_\+ type alias \end{DoxyCompactList}\item
  30. {\footnotesize template$<$typename... $>$ }\\using \mbox{\hyperlink{group__detection_gae7373c997420d16cf37e542eb3cfa3ad}{utl\+::meta\+::void\+\_\+t}} = void
  31. \begin{DoxyCompactList}\small\item\em void\+\_\+t type alias \end{DoxyCompactList}\item
  32. {\footnotesize template$<$typename Default , template$<$ typename... $>$ class Op, typename... Args$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_1_1detail_a835827cb3116483228d6f7f774b68970}{utl\+::meta\+::detail\+::detected\+\_\+or}} = detector$<$ Default, void, Op, Args... $>$
  33. \begin{DoxyCompactList}\small\item\em helper for detected\+\_\+or\+\_\+t \end{DoxyCompactList}\end{DoxyCompactItemize}
  34. \begin{DoxyCompactItemize}
  35. \item
  36. {\footnotesize template$<$template$<$ typename... $>$ class Op, typename... Args$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_a5329219a9d2f195421a78d8e07873507}{utl\+::meta\+::is\+\_\+detected}} = typename detail\+::detector$<$ nat\+\_\+, void, Op, Args... $>$\+::detected
  37. \item
  38. {\footnotesize template$<$template$<$ typename... $>$ class Op, typename... Args$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_aa654a286b3bc8e6d8116ee1f57087110}{utl\+::meta\+::detected\+\_\+t}} = eval$<$ detail\+::detector$<$ nat\+\_\+, void, Op, Args... $>$ $>$
  39. \item
  40. {\footnotesize template$<$typename Default , template$<$ typename... $>$ class Op, typename... Args$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_a8fd055bc6c6c3b1d551e9605aa35644c}{utl\+::meta\+::detected\+\_\+or\+\_\+t}} = eval$<$ detail\+::detected\+\_\+or$<$ Default, Op, Args... $>$ $>$
  41. \item
  42. {\footnotesize template$<$typename Expected , template$<$ typename... $>$ class Op, typename... Args$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_ad5224ef66e8f40efaaf3ad3d605dd629}{utl\+::meta\+::is\+\_\+detected\+\_\+exact}} = eval$<$ same\+\_\+$<$ Expected, detected\+\_\+t$<$ Op, Args... $>$ $>$ $>$
  43. \item
  44. {\footnotesize template$<$typename To , template$<$ typename... $>$ class Op, typename... Args$>$ }\\using \mbox{\hyperlink{namespaceutl_1_1meta_afa24702fa15a1d0a8a05761c54b79def}{utl\+::meta\+::is\+\_\+detected\+\_\+convertible}} = eval$<$ std\+::is\+\_\+convertible$<$ detected\+\_\+t$<$ Op, Args... $>$, To $>$ $>$
  45. \item
  46. {\footnotesize template$<$template$<$ typename... $>$ class Op, typename... Args$>$ }\\constexpr bool \mbox{\hyperlink{namespaceutl_1_1meta_a4f3184ccb8e8ba2a78e2d2e83a0b9885}{utl\+::meta\+::is\+\_\+detected\+\_\+v}} = is\+\_\+detected$<$Op, Args...$>$\+::value
  47. \begin{DoxyCompactList}\small\item\em Detection predicate. \end{DoxyCompactList}\item
  48. {\footnotesize template$<$typename Expected , template$<$ typename... $>$ class Op, typename... Args$>$ }\\constexpr bool \mbox{\hyperlink{namespaceutl_1_1meta_a960827a1d72083a511f8ea4ccc8beceb}{utl\+::meta\+::is\+\_\+detected\+\_\+exact\+\_\+v}} = is\+\_\+detected\+\_\+exact$<$ Expected, Op, Args...$>$\+::value
  49. \begin{DoxyCompactList}\small\item\em evaluates to true if evaluation of Op$<$\+Args...$>$ is {\ttfamily Expected} and to false if not \end{DoxyCompactList}\item
  50. {\footnotesize template$<$typename To , template$<$ typename... $>$ class Op, typename... Args$>$ }\\constexpr bool \mbox{\hyperlink{namespaceutl_1_1meta_acba521b528e775be4b37d2e481e0f138}{utl\+::meta\+::is\+\_\+detected\+\_\+convertible\+\_\+v}}
  51. \end{DoxyCompactItemize}
  52. \subsection{Detailed Description}
  53. Detection idiom based on W\+G21\textquotesingle{}s N4502 \mbox{[}\mbox{\hyperlink{detection_8h_n4502}{n4502}} 1\mbox{]} from Walter E. Brown.
  54. \label{detection_8h_n4502}%
  55. \Hypertarget{detection_8h_n4502}%
  56. \mbox{[}1\mbox{]}\+: www.\+open-\/std.\+org/jtc1/sc22/wg21/docs/papers/2015/n4502.pdf
  57. Copyright (C) 2018-\/2019 Christos Choutouridis
  58. This program is free software\+: you can redistribute it and/or modify it under the terms of the G\+NU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  59. This program is distributed in the hope that it will be useful, but W\+I\+T\+H\+O\+UT A\+NY W\+A\+R\+R\+A\+N\+TY; without even the implied warranty of M\+E\+R\+C\+H\+A\+N\+T\+A\+B\+I\+L\+I\+TY or F\+I\+T\+N\+E\+SS F\+OR A P\+A\+R\+T\+I\+C\+U\+L\+AR P\+U\+R\+P\+O\+SE. See the G\+NU Lesser General Public License for more details.
  60. You should have received a copy of the G\+NU Lesser General Public License along with this program. If not, see \href{http://www.gnu.org/licenses/}{\tt http\+://www.\+gnu.\+org/licenses/}.