\hypertarget{kblib__traits_8h}{}\section{kblib\+\_\+traits.\+h File Reference} \label{kblib__traits_8h}\index{kblib\+\_\+traits.\+h@{kblib\+\_\+traits.\+h}} {\ttfamily \#include $<$array$>$}\newline {\ttfamily \#include $<$cstring$>$}\newline {\ttfamily \#include $<$tuple$>$}\newline {\ttfamily \#include $<$type\+\_\+traits$>$}\newline Include dependency graph for kblib\+\_\+traits.\+h\+:\nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=318pt]{kblib__traits_8h__incl} \end{center} \end{figure} This graph shows which files directly or indirectly include this file\+:\nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=350pt]{kblib__traits_8h__dep__incl} \end{center} \end{figure} \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structkblib_1_1detail_1_1contains__type}{kblib\+::detail\+::contains\+\_\+type$<$ Tuple, T $>$} \begin{DoxyCompactList}\small\item\em Determines if T is a type in Tuple, which must be a std\+::tuple. \end{DoxyCompactList}\item struct \hyperlink{structkblib_1_1detail_1_1contains__type_3_01std_1_1tuple_3_01_t_00_01_ts_8_8_8_01_4_00_01_u_01_4}{kblib\+::detail\+::contains\+\_\+type$<$ std\+::tuple$<$ T, Ts... $>$, U $>$} \item struct \hyperlink{structkblib_1_1detail_1_1contains__type_3_01std_1_1tuple_3_01_t_00_01_ts_8_8_8_01_4_00_01_t_01_4}{kblib\+::detail\+::contains\+\_\+type$<$ std\+::tuple$<$ T, Ts... $>$, T $>$} \item struct \hyperlink{structkblib_1_1detail_1_1contains__type_3_01std_1_1tuple_3_4_00_01_t_01_4}{kblib\+::detail\+::contains\+\_\+type$<$ std\+::tuple$<$$>$, T $>$} \item struct \hyperlink{structkblib_1_1detail_1_1contains__types}{kblib\+::detail\+::contains\+\_\+types$<$ Lhs, Rhs $>$} \begin{DoxyCompactList}\small\item\em Determines if Lhs contains all of the types in Rhs, where both are std\+::tuples. \end{DoxyCompactList}\item struct \hyperlink{structkblib_1_1detail_1_1contains__types_3_01_tuple_00_01std_1_1tuple_3_01_t_00_01_ts_8_8_8_01_4_01_4}{kblib\+::detail\+::contains\+\_\+types$<$ Tuple, std\+::tuple$<$ T, Ts... $>$ $>$} \item struct \hyperlink{structkblib_1_1detail_1_1contains__types_3_01_tuple_00_01std_1_1tuple_3_4_01_4}{kblib\+::detail\+::contains\+\_\+types$<$ Tuple, std\+::tuple$<$$>$ $>$} \item struct \hyperlink{structkblib_1_1detail_1_1is__resizable}{kblib\+::detail\+::is\+\_\+resizable$<$ C $>$} \item struct \hyperlink{structkblib_1_1detail_1_1has__reserve}{kblib\+::detail\+::has\+\_\+reserve$<$ C, typename $>$} \item struct \hyperlink{structkblib_1_1detail_1_1has__reserve_3_01_c_00_01fakestd_1_1void__t_3_01decltype_07std_1_1declv8c2e27aed6eb24ee719abf6c26576e61}{kblib\+::detail\+::has\+\_\+reserve$<$ C, fakestd\+::void\+\_\+t$<$ decltype(std\+::declval$<$ C \& $>$.\+reserve(0))$>$ $>$} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item \hyperlink{namespacekblib}{kblib} \item \hyperlink{namespacekblib_1_1detail}{kblib\+::detail} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item {\footnotesize template$<$typename T , int N, int... I$>$ }\\constexpr auto \hyperlink{namespacekblib_1_1detail_a6fec5030c44cc47bbd2ba3a9836217d6}{kblib\+::detail\+::trim\+\_\+array} (const T(\&arr)\mbox{[}N\mbox{]}, std\+::integer\+\_\+sequence$<$ int, I... $>$ Is) -\/$>$ std\+::array$<$ T, Is.\+size()$>$ \begin{DoxyCompactList}\small\item\em Truncates an array to its first N elements. \end{DoxyCompactList}\item {\footnotesize template$<$int trim, typename T , int N, typename Indices = std\+::make\+\_\+integer\+\_\+sequence$<$int, N -\/ trim$>$$>$ }\\constexpr std\+::array$<$ T, N -\/ trim $>$ \hyperlink{namespacekblib_a5fd53eab2c7a0c0ffb80009fafdb217d}{kblib\+::trim\+\_\+array} (const T(\&arr)\mbox{[}N\mbox{]}) \begin{DoxyCompactList}\small\item\em Truncates the last trim elements from an array. \end{DoxyCompactList}\item {\footnotesize template$<$int N, typename Indices = std\+::make\+\_\+integer\+\_\+sequence$<$int, N -\/ 1$>$$>$ }\\constexpr std\+::array$<$ char, N -\/ 1 $>$ \hyperlink{namespacekblib_a9567ef8b9caf56ac0e3ef990e6c14a12}{kblib\+::remove\+\_\+null\+\_\+terminator} (const char(\&arr)\mbox{[}N\mbox{]}) \begin{DoxyCompactList}\small\item\em Creates an array of only the meaningful characters in a string literal, and not the null terminator. \end{DoxyCompactList}\item {\footnotesize template$<$typename T , typename F $>$ }\\T \hyperlink{namespacekblib_abec8c0332af17469bc7ac1992b0db7a8}{kblib\+::byte\+\_\+cast} (F v) \begin{DoxyCompactList}\small\item\em Creates a T with the same object representation as the given F. \end{DoxyCompactList}\item {\footnotesize template$<$typename C , typename = decltype(std\+::declval$<$\+C\&$>$().\+resize(0))$>$ }\\constexpr bool \hyperlink{namespacekblib_1_1detail_a6a2b37982083af0dac0384bd6a27a2c1}{kblib\+::detail\+::calc\+\_\+resizable} () noexcept \item constexpr bool \hyperlink{namespacekblib_1_1detail_a69010a9fd21efc59789de3860aea86ba}{kblib\+::detail\+::calc\+\_\+resizable} (...) noexcept \item {\footnotesize template$<$typename C , typename std\+::enable\+\_\+if$<$ detail\+::has\+\_\+reserve\+\_\+v$<$ C $>$, int $>$\+::type = 0$>$ }\\void \hyperlink{namespacekblib_a6c72ec5b660d5a2c6c3e2a9de0794532}{kblib\+::try\+\_\+reserve} (C \&c, std\+::size\+\_\+t s) noexcept(noexcept(c.\+reserve(s))) \begin{DoxyCompactList}\small\item\em Attempt to reserve capacity in a container. No-\/op if unsupported. \end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Variables} \begin{DoxyCompactItemize} \item {\footnotesize template$<$typename... Ts$>$ }\\constexpr bool \hyperlink{namespacekblib_1_1detail_a01414f490748a613e120e2777496fa3a}{kblib\+::detail\+::contains\+\_\+type\+\_\+v} = contains\+\_\+type$<$Ts...$>$\+::value \item {\footnotesize template$<$typename... Ts$>$ }\\constexpr bool \hyperlink{namespacekblib_1_1detail_af0f2d24cadd40eabc95ff1287f9ba05e}{kblib\+::detail\+::contains\+\_\+types\+\_\+v} = contains\+\_\+types$<$Ts...$>$\+::value \item {\footnotesize template$<$typename C $>$ }\\constexpr bool \hyperlink{namespacekblib_1_1detail_a326458ca975b7ee78d07ea8976100429}{kblib\+::detail\+::is\+\_\+resizable\+\_\+v} = is\+\_\+resizable$<$C$>$\+::value \item {\footnotesize template$<$typename C $>$ }\\constexpr bool \hyperlink{namespacekblib_1_1detail_a2afbe43bc4670d220fb6ffd2bca03f34}{kblib\+::detail\+::has\+\_\+reserve\+\_\+v} = has\+\_\+reserve$<$C$>$\+::value \begin{DoxyCompactList}\small\item\em True if and only if C contains an accessible reserve() member. \end{DoxyCompactList}\end{DoxyCompactItemize} \subsection{Detailed Description} Contains some type traits not in the standard library that are useful in the implementation of kblib.