\hypertarget{simple_8h}{}\doxysection{kblib/simple.h File Reference}
\label{simple_8h}\index{kblib/simple.h@{kblib/simple.h}}


Provides general utilities which do not fit in any more specific header.  


{\ttfamily \#include \char`\"{}iterators.\+h\char`\"{}}\newline
{\ttfamily \#include $<$bitset$>$}\newline
{\ttfamily \#include $<$climits$>$}\newline
{\ttfamily \#include $<$cstdint$>$}\newline
{\ttfamily \#include $<$initializer\+\_\+list$>$}\newline
{\ttfamily \#include $<$limits$>$}\newline
{\ttfamily \#include $<$numeric$>$}\newline
{\ttfamily \#include $<$utility$>$}\newline
Include dependency graph for simple.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{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=350pt]{simple_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structkblib_1_1detail__simple_1_1simple__range}{kblib\+::detail\+\_\+simple\+::simple\+\_\+range$<$ T $>$}}
\item 
struct \mbox{\hyperlink{structkblib_1_1_r_a_i_i__wrapper}{kblib\+::\+RAII\+\_\+wrapper$<$ T $>$}}
\item 
struct \mbox{\hyperlink{structkblib_1_1first__bigger__than}{kblib\+::first\+\_\+bigger\+\_\+than$<$ size, T, Ts $>$}}
\item 
struct \mbox{\hyperlink{structkblib_1_1first__bigger__than_3_01size_00_01_t_01_4}{kblib\+::first\+\_\+bigger\+\_\+than$<$ size, T $>$}}
\item 
struct \mbox{\hyperlink{structkblib_1_1identity}{kblib\+::identity}}
\begin{DoxyCompactList}\small\item\em The identity function, as a function object. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
namespace \mbox{\hyperlink{namespacekblib}{kblib}}
\begin{DoxyCompactList}\small\item\em The main namespace in which all entities from kblib are defined. \end{DoxyCompactList}\item 
namespace \mbox{\hyperlink{namespacekblib_1_1detail__simple}{kblib\+::detail\+\_\+simple}}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{simple_8h_af39ee5353ef0565c8970b7a3a3e9ca14}{KBLIB\+\_\+\+DEBUG\+\_\+\+LOG\+\_\+\+RANGES}}~0
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$std\+::uintmax\+\_\+t I$>$ }\\using \mbox{\hyperlink{namespacekblib_af598d7431e3f5b0be999dc7cb1ddca42}{kblib\+::uint\+\_\+smallest}} = typename first\+\_\+bigger\+\_\+than$<$ 1+filg2(I)/CHAR\+\_\+\+BIT, unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long, std\+::uintmax\+\_\+t $>$\+::type
\item 
{\footnotesize template$<$std\+::uintmax\+\_\+t I$>$ }\\using \mbox{\hyperlink{namespacekblib_a01bce53d45632d6f32fe5af269533805}{kblib\+::int\+\_\+smallest}} = typename first\+\_\+bigger\+\_\+than$<$ 1+(filg2(I)+1)/CHAR\+\_\+\+BIT, signed char, signed short, signed int, signed long, signed long long, std\+::uintmax\+\_\+t $>$\+::type
\item 
{\footnotesize template$<$std\+::uintmax\+\_\+t I$>$ }\\using \mbox{\hyperlink{namespacekblib_af6581571367a6b54af65b1174c2f416f}{kblib\+::uint\+\_\+smallest\+\_\+t}} = typename uint\+\_\+smallest$<$ I $>$\+::type
\item 
{\footnotesize template$<$std\+::uintmax\+\_\+t I$>$ }\\using \mbox{\hyperlink{namespacekblib_a54235123af1b79489fb0484fc64318ff}{kblib\+::int\+\_\+smallest\+\_\+t}} = typename int\+\_\+smallest$<$ I $>$\+::type
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename T $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a0657f89209aa9c1f4c95ce00e2744f24}{kblib\+::in\+\_\+range}} (const T \&v, detail\+\_\+simple\+::simple\+\_\+range$<$ T $>$ r)
\item 
{\footnotesize template$<$typename T $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_afef50b8a478317dbcbc249e688f6e93b}{kblib\+::in\+\_\+range\+\_\+i}} (const T \&v, detail\+\_\+simple\+::simple\+\_\+range$<$ T $>$ r)
\item 
{\footnotesize template$<$typename F , typename... T$>$ }\\auto \mbox{\hyperlink{namespacekblib_a1490492d82c28f195f0f44a9d88fb2cc}{kblib\+::map}} (F f, T \&\&... t) noexcept(noexcept(std\+::tuple\{ \mbox{\hyperlink{namespacekblib_a3873199be1651ec4e0fda92171b2b82c}{kblib\+::apply}}(f, std\+::forward$<$ T $>$(t))...\})) -\/$>$ enable\+\_\+if\+\_\+t$<$ not any\+\_\+void$<$ decltype(\mbox{\hyperlink{namespacekblib_a3873199be1651ec4e0fda92171b2b82c}{kblib\+::apply}}(f, std\+::forward$<$ T $>$(t)))... $>$, decltype(std\+::tuple\{\mbox{\hyperlink{namespacekblib_a3873199be1651ec4e0fda92171b2b82c}{kblib\+::apply}}(f, std\+::forward$<$ T $>$(t))...\})$>$
\item 
{\footnotesize template$<$typename F $>$ }\\auto \mbox{\hyperlink{namespacekblib_a87e300394cbdcefd780d0904b31f4c07}{kblib\+::defer}} (F f)
\item 
{\footnotesize template$<$typename Binary\+Operation $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ac4b288376b8a5fcf8fceba9e426a45fa}{kblib\+::flip}} () -\/$>$ auto
\begin{DoxyCompactList}\small\item\em Transforms a stateless binary operation into one which takes reversed arguments. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Binary\+Operation $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_ab2c94cb864bd6de586bfd329e515df32}{kblib\+::flip}} (Binary\+Operation op) -\/$>$ auto
\begin{DoxyCompactList}\small\item\em Transforms a binary operation into one which takes reversed arguments. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T , std\+::size\+\_\+t N$>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a0f3921343096a5041fd08ecf6287701a}{kblib\+::is\+\_\+consecutive}} (const T(\&array)\mbox{[}N\mbox{]}) -\/$>$ enable\+\_\+if\+\_\+t$<$ std\+::is\+\_\+integral$<$ T $>$\+::value, bool $>$
\item 
constexpr auto \mbox{\hyperlink{namespacekblib_a5633a966716e66c8230d039c7615e393}{kblib\+::filg2}} (const std\+::bitset$<$ std\+::numeric\+\_\+limits$<$ std\+::uintmax\+\_\+t $>$\+::digits $>$ val) noexcept -\/$>$ int
\begin{DoxyCompactList}\small\item\em Floored integer binary logarithm. Returns floor(lb(val)). \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\auto \mbox{\hyperlink{namespacekblib_a535ff4e383fdfe8e07c637d574b68008}{kblib\+::safe\+\_\+auto}} (T \&\&in) -\/$>$ T
\begin{DoxyCompactList}\small\item\em Safely propagate an xvalue or lvalue without dangling references. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\auto \mbox{\hyperlink{namespacekblib_a5b06c53a850d4a275c26a068b907caeb}{kblib\+::safe\+\_\+auto}} (T \&in) -\/$>$ T \&
\begin{DoxyCompactList}\small\item\em Safely propagate an xvalue or lvalue without dangling references. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Left\+Container , typename Right\+Container $>$ }\\auto \mbox{\hyperlink{namespacekblib_a4b5107514451c00067d9ec0c58721009}{kblib\+::arraycat}} (Left\+Container A, Right\+Container \&\&B) noexcept(noexcept(A.\+insert(A.\+end(), B.\+begin(), B.\+end())) and std\+::is\+\_\+nothrow\+\_\+move\+\_\+constructible$<$ Left\+Container $>$\+::value) -\/$>$ Left\+Container
\begin{DoxyCompactList}\small\item\em Concatenate two dynamic containers together. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\constexpr auto \mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{kblib\+::a}} (const std\+::initializer\+\_\+list$<$ T $>$ \&a) -\/$>$ auto
\begin{DoxyCompactList}\small\item\em Index an array literal without naming its type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename... Ts$>$ }\\constexpr bool \mbox{\hyperlink{namespacekblib_aba974d3674b8fe6b1cf75e16a66322f0}{kblib\+::any\+\_\+void}} = (std\+::is\+\_\+void\+\_\+v$<$Ts$>$ or ...)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Provides general utilities which do not fit in any more specific header. 

\begin{DoxyAuthor}{Author}
killerbee 
\end{DoxyAuthor}
\begin{DoxyDate}{Date}
2019-\/2021 
\end{DoxyDate}
\begin{DoxyCopyright}{Copyright}
GNU General Public Licence v3.\+0 
\end{DoxyCopyright}


Definition in file \mbox{\hyperlink{simple_8h_source}{simple.\+h}}.



\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{simple_8h_af39ee5353ef0565c8970b7a3a3e9ca14}\label{simple_8h_af39ee5353ef0565c8970b7a3a3e9ca14}} 
\index{simple.h@{simple.h}!KBLIB\_DEBUG\_LOG\_RANGES@{KBLIB\_DEBUG\_LOG\_RANGES}}
\index{KBLIB\_DEBUG\_LOG\_RANGES@{KBLIB\_DEBUG\_LOG\_RANGES}!simple.h@{simple.h}}
\doxysubsubsection{\texorpdfstring{KBLIB\_DEBUG\_LOG\_RANGES}{KBLIB\_DEBUG\_LOG\_RANGES}}
{\footnotesize\ttfamily \#define KBLIB\+\_\+\+DEBUG\+\_\+\+LOG\+\_\+\+RANGES~0}



Definition at line \mbox{\hyperlink{simple_8h_source_l00045}{45}} of file \mbox{\hyperlink{simple_8h_source}{simple.\+h}}.

