\hypertarget{kblib__simple_8h}{}\section{kblib\+\_\+simple.\+h File Reference} \label{kblib__simple_8h}\index{kblib\+\_\+simple.\+h@{kblib\+\_\+simple.\+h}} {\ttfamily \#include \char`\"{}kblib\+\_\+tdecl.\+h\char`\"{}}\newline {\ttfamily \#include \char`\"{}kblib\+\_\+traits.\+h\char`\"{}}\newline {\ttfamily \#include $<$cstdint$>$}\newline {\ttfamily \#include $<$initializer\+\_\+list$>$}\newline {\ttfamily \#include $<$limits$>$}\newline Include dependency graph for kblib\+\_\+simple.\+h\+:\nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=350pt]{kblib__simple_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=300pt]{kblib__simple_8h__dep__incl} \end{center} \end{figure} \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classkblib_1_1range__t}{kblib\+::range\+\_\+t$<$ Value, Delta $>$} \begin{DoxyCompactList}\small\item\em A range generator, similar to Python 3\textquotesingle{}s \hyperlink{namespacekblib_a7c962dffe618cc9d1f8a70bf4a4a3be3}{range()}. \end{DoxyCompactList}\item struct \hyperlink{structkblib_1_1range__t_1_1iterator}{kblib\+::range\+\_\+t$<$ Value, Delta $>$\+::iterator} \begin{DoxyCompactList}\small\item\em A helper struct which acts as an iterator for the range elements, as they are generated on the fly. \end{DoxyCompactList}\item struct \hyperlink{structkblib_1_1incrementer}{kblib\+::incrementer} \begin{DoxyCompactList}\small\item\em A struct which increments anything it is added to. Suitable for use as a Delta type for \hyperlink{classkblib_1_1range__t}{range\+\_\+t}. \end{DoxyCompactList}\item struct \hyperlink{structkblib_1_1decrementer}{kblib\+::decrementer} \begin{DoxyCompactList}\small\item\em A struct which decrements anything it is added to. Suitable for use as a Delta type for \hyperlink{classkblib_1_1range__t}{range\+\_\+t}. \end{DoxyCompactList}\item struct \hyperlink{structkblib_1_1fnv_1_1fnv__prime}{kblib\+::fnv\+::fnv\+\_\+prime$<$ U\+Int $>$} \begin{DoxyCompactList}\small\item\em The prime to use for the F\+N\+Va hash algorithm, as a type trait. \end{DoxyCompactList}\item struct \hyperlink{structkblib_1_1fnv_1_1fnv__prime_3_01std_1_1uint32__t_01_4}{kblib\+::fnv\+::fnv\+\_\+prime$<$ std\+::uint32\+\_\+t $>$} \item struct \hyperlink{structkblib_1_1fnv_1_1fnv__prime_3_01std_1_1uint64__t_01_4}{kblib\+::fnv\+::fnv\+\_\+prime$<$ std\+::uint64\+\_\+t $>$} \item struct \hyperlink{structkblib_1_1fnv_1_1fnv__offset}{kblib\+::fnv\+::fnv\+\_\+offset$<$ U\+Int $>$} \begin{DoxyCompactList}\small\item\em The starting value for the F\+N\+Va hash algorithm, as a type trait. \end{DoxyCompactList}\item struct \hyperlink{structkblib_1_1fnv_1_1fnv__offset_3_01std_1_1uint32__t_01_4}{kblib\+::fnv\+::fnv\+\_\+offset$<$ std\+::uint32\+\_\+t $>$} \item struct \hyperlink{structkblib_1_1fnv_1_1fnv__offset_3_01std_1_1uint64__t_01_4}{kblib\+::fnv\+::fnv\+\_\+offset$<$ std\+::uint64\+\_\+t $>$} \item struct \hyperlink{structkblib_1_1padding__bits}{kblib\+::padding\+\_\+bits$<$ T $>$} \item struct \hyperlink{structkblib_1_1_f_n_v__hash}{kblib\+::\+F\+N\+V\+\_\+hash$<$ Key, typename $>$} \item struct \hyperlink{structkblib_1_1_f_n_v__hash_3_01bool_00_01void_01_4}{kblib\+::\+F\+N\+V\+\_\+hash$<$ bool, void $>$} \item struct \hyperlink{structkblib_1_1_f_n_v__hash_3_01char_00_01void_01_4}{kblib\+::\+F\+N\+V\+\_\+hash$<$ char, void $>$} \item struct \hyperlink{structkblib_1_1_f_n_v__hash_3_01signed_01char_00_01void_01_4}{kblib\+::\+F\+N\+V\+\_\+hash$<$ signed char, void $>$} \item struct \hyperlink{structkblib_1_1_f_n_v__hash_3_01unsigned_01char_00_01void_01_4}{kblib\+::\+F\+N\+V\+\_\+hash$<$ unsigned char, void $>$} \item struct \hyperlink{structkblib_1_1_f_n_v__hash_3_01_t_00_01fakestd_1_1void__t_3_01typename_01std_1_1enable__if_3_011b29feae6f328b46201522c169e50a3b}{kblib\+::\+F\+N\+V\+\_\+hash$<$ T, fakestd\+::void\+\_\+t$<$ typename std\+::enable\+\_\+if$<$ std\+::is\+\_\+integral$<$ T $>$\+::value, T $>$\+::type $>$ $>$} \item struct \hyperlink{structkblib_1_1first__bigger__than}{kblib\+::first\+\_\+bigger\+\_\+than$<$ size, T, Ts $>$} \item struct \hyperlink{structkblib_1_1first__bigger__than_3_01size_00_01_t_01_4}{kblib\+::first\+\_\+bigger\+\_\+than$<$ size, T $>$} \item struct \hyperlink{structkblib_1_1ignore}{kblib\+::ignore$<$ typename, T $>$} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item \hyperlink{namespacekblib}{kblib} \item \hyperlink{namespacekblib_1_1fnv}{kblib\+::fnv} \item \hyperlink{namespacekblib_1_1literals}{kblib\+::literals} \item \hyperlink{namespacekblib_1_1detail}{kblib\+::detail} \end{DoxyCompactItemize} \subsection*{Macros} \begin{DoxyCompactItemize} \item \#define \hyperlink{kblib__simple_8h_af39ee5353ef0565c8970b7a3a3e9ca14}{K\+B\+L\+I\+B\+\_\+\+D\+E\+B\+U\+G\+\_\+\+L\+O\+G\+\_\+\+R\+A\+N\+G\+ES}~0 \end{DoxyCompactItemize} \subsection*{Typedefs} \begin{DoxyCompactItemize} \item {\footnotesize template$<$std\+::uintmax\+\_\+t I$>$ }\\using \hyperlink{namespacekblib_a0c9ee1c737880b7f375420d9a07c4aa7}{kblib\+::uint\+\_\+smallest} = typename first\+\_\+bigger\+\_\+than$<$ 1+detail\+::filg2(I)/C\+H\+A\+R\+\_\+\+B\+IT, unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long, std\+::uintmax\+\_\+t $>$\+::type \item {\footnotesize template$<$std\+::uintmax\+\_\+t I$>$ }\\using \hyperlink{namespacekblib_a1d91774609892a17c166418f350f9086}{kblib\+::int\+\_\+smallest} = typename first\+\_\+bigger\+\_\+than$<$ 1+(detail\+::filg2(I)+1)/C\+H\+A\+R\+\_\+\+B\+IT, signed char, signed short, signed int, signed long, signed long long, std\+::uintmax\+\_\+t $>$\+::type \item {\footnotesize template$<$std\+::uintmax\+\_\+t I$>$ }\\using \hyperlink{namespacekblib_af6581571367a6b54af65b1174c2f416f}{kblib\+::uint\+\_\+smallest\+\_\+t} = typename uint\+\_\+smallest$<$ I $>$\+::type \item {\footnotesize template$<$std\+::uintmax\+\_\+t I$>$ }\\using \hyperlink{namespacekblib_a54235123af1b79489fb0484fc64318ff}{kblib\+::int\+\_\+smallest\+\_\+t} = typename int\+\_\+smallest$<$ I $>$\+::type \item {\footnotesize template$<$typename T $>$ }\\using \hyperlink{namespacekblib_a8fe1791c4dfe674d145963ab5b3121ae}{kblib\+::alias} = T \item {\footnotesize template$<$typename U , typename T $>$ }\\using \hyperlink{namespacekblib_a3cec35675700d7e15c9139e0497768e6}{kblib\+::ignore\+\_\+t} = typename ignore$<$ U, T $>$\+::type \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item {\footnotesize template$<$typename T $>$ }\\constexpr T \hyperlink{namespacekblib_a8f7b09d813c75af1ad6148d47a2449c6}{kblib\+::operator+} (T val, incrementer) \begin{DoxyCompactList}\small\item\em Increments val. \end{DoxyCompactList}\item {\footnotesize template$<$typename T $>$ }\\constexpr T \hyperlink{namespacekblib_af72f30cc1b87a5034f5b89916ff400d2}{kblib\+::operator+} (T val, decrementer) \begin{DoxyCompactList}\small\item\em Decrements val. \end{DoxyCompactList}\item {\footnotesize template$<$typename Value , typename Delta = int$>$ }\\constexpr range\+\_\+t$<$ Value, Delta $>$ \hyperlink{namespacekblib_a7c962dffe618cc9d1f8a70bf4a4a3be3}{kblib\+::range} (Value min, Value max, Delta step=0) \begin{DoxyCompactList}\small\item\em Constructs a range from beginning, end, and step amount. The range is half-\/open, that is min is in the range but max is not. If unspecified, the step is automatically either 1 or -\/1, depending on whether max $>$ min. \end{DoxyCompactList}\item {\footnotesize template$<$typename Value $>$ }\\constexpr range\+\_\+t$<$ Value, int $>$ \hyperlink{namespacekblib_a49053de063eae45591c5b2de8c26d90f}{kblib\+::range} (Value max) \begin{DoxyCompactList}\small\item\em Constructs a half-\/open range \mbox{[}from 0 to max. \mbox{[}0, max). The step is automatically determined based on the sign of max. \end{DoxyCompactList}\item {\footnotesize template$<$typename Hash\+Int , typename Span $>$ }\\constexpr Hash\+Int \hyperlink{namespacekblib_ae34baa2b737cdb9d9e3ca60a818ef779}{kblib\+::\+F\+N\+Va} (Span \&\&s, Hash\+Int hval=fnv\+::fnv\+\_\+offset$<$ Hash\+Int $>$\+::value) \begin{DoxyCompactList}\small\item\em A templatized generic F\+N\+Va hash function. \end{DoxyCompactList}\item {\footnotesize template$<$typename Hash\+Int , typename CharT , std\+::size\+\_\+t N$>$ }\\constexpr Hash\+Int \hyperlink{namespacekblib_a5289ac655b4cce95e7b03505db997781}{kblib\+::\+F\+N\+Va\+\_\+a} (const CharT(\&s)\mbox{[}N\mbox{]}, Hash\+Int hval=fnv\+::fnv\+\_\+offset$<$ Hash\+Int $>$\+::value) \begin{DoxyCompactList}\small\item\em A templatized F\+N\+Va hash function, for raw character arrays, such as string literals. \end{DoxyCompactList}\item {\footnotesize template$<$typename Hash\+Int $>$ }\\constexpr Hash\+Int \hyperlink{namespacekblib_a20bea4ca68e2f22d6d2dd840596f9142}{kblib\+::\+F\+N\+Va\+\_\+s} (const char $\ast$begin, std\+::size\+\_\+t length, Hash\+Int hval=fnv\+::fnv\+\_\+offset$<$ Hash\+Int $>$\+::value) \item {\footnotesize template$<$std\+::size\+\_\+t N$>$ }\\constexpr std\+::uint32\+\_\+t \hyperlink{namespacekblib_a4b3fa52b0dbfd622917e37068265aa40}{kblib\+::\+F\+N\+V32a\+\_\+a} (const char(\&s)\mbox{[}N\mbox{]}, uint32\+\_\+t hval=2166136261) \begin{DoxyCompactList}\small\item\em A standard F\+N\+V32a hash function, for raw character arrays, such as string literals. \end{DoxyCompactList}\item constexpr std\+::uint32\+\_\+t \hyperlink{namespacekblib_adeae625d34c2400eb9cad2802745a07c}{kblib\+::\+F\+N\+V32a\+\_\+s} (const char $\ast$begin, std\+::size\+\_\+t length, uint32\+\_\+t hval=2166136261) \item constexpr std\+::uint32\+\_\+t \hyperlink{namespacekblib_1_1literals_a134aef120848a74fc71b9975b42215bc}{kblib\+::literals\+::operator\char`\"{}\char`\"{}\+\_\+fnv32} (const char $\ast$str, std\+::size\+\_\+t length) \begin{DoxyCompactList}\small\item\em A literal suffix that produces the F\+N\+V32a hash of a string literal. \end{DoxyCompactList}\item constexpr std\+::uint64\+\_\+t \hyperlink{namespacekblib_1_1literals_a4bc5da059db8406c13fe619d9188a596}{kblib\+::literals\+::operator\char`\"{}\char`\"{}\+\_\+fnv64} (const char $\ast$str, std\+::size\+\_\+t length) \begin{DoxyCompactList}\small\item\em A literal suffix that produces the F\+N\+V64a hash of a string literal. \end{DoxyCompactList}\item constexpr int \hyperlink{namespacekblib_1_1detail_a5426ea3b8b5ba0ccd80d16c4c5436bc9}{kblib\+::detail\+::filg2} (const std\+::bitset$<$ std\+::numeric\+\_\+limits$<$ std\+::uintmax\+\_\+t $>$\+::digits $>$ val) \begin{DoxyCompactList}\small\item\em Floored integer binary logarithm. Returns floor(lb(val)). \end{DoxyCompactList}\item {\footnotesize template$<$typename Container $>$ }\\Container \hyperlink{namespacekblib_a7aa43d0dfb171bb304d2f9558dcee131}{kblib\+::arraycat} (Container A, Container \&\&B) \item {\footnotesize template$<$typename T $>$ }\\constexpr auto \hyperlink{namespacekblib_af1dd5b5a681661f9db32ffad764d415b}{kblib\+::a} (const std\+::initializer\+\_\+list$<$ T $>$ \&a) \end{DoxyCompactItemize} \subsection*{Variables} \begin{DoxyCompactItemize} \item {\footnotesize template$<$typename T $>$ }\\constexpr int \hyperlink{namespacekblib_a87295f2bf3c1f64ed3b04f4664fa2a78}{kblib\+::padding\+\_\+bits\+\_\+v} = padding\+\_\+bits$<$T$>$\+::value \end{DoxyCompactItemize} \subsection{Macro Definition Documentation} \mbox{\Hypertarget{kblib__simple_8h_af39ee5353ef0565c8970b7a3a3e9ca14}\label{kblib__simple_8h_af39ee5353ef0565c8970b7a3a3e9ca14}} \index{kblib\+\_\+simple.\+h@{kblib\+\_\+simple.\+h}!K\+B\+L\+I\+B\+\_\+\+D\+E\+B\+U\+G\+\_\+\+L\+O\+G\+\_\+\+R\+A\+N\+G\+ES@{K\+B\+L\+I\+B\+\_\+\+D\+E\+B\+U\+G\+\_\+\+L\+O\+G\+\_\+\+R\+A\+N\+G\+ES}} \index{K\+B\+L\+I\+B\+\_\+\+D\+E\+B\+U\+G\+\_\+\+L\+O\+G\+\_\+\+R\+A\+N\+G\+ES@{K\+B\+L\+I\+B\+\_\+\+D\+E\+B\+U\+G\+\_\+\+L\+O\+G\+\_\+\+R\+A\+N\+G\+ES}!kblib\+\_\+simple.\+h@{kblib\+\_\+simple.\+h}} \subsubsection{\texorpdfstring{K\+B\+L\+I\+B\+\_\+\+D\+E\+B\+U\+G\+\_\+\+L\+O\+G\+\_\+\+R\+A\+N\+G\+ES}{KBLIB\_DEBUG\_LOG\_RANGES}} {\footnotesize\ttfamily \#define K\+B\+L\+I\+B\+\_\+\+D\+E\+B\+U\+G\+\_\+\+L\+O\+G\+\_\+\+R\+A\+N\+G\+ES~0} Definition at line 11 of file kblib\+\_\+simple.\+h.