\hypertarget{struct_k_b_l_i_b___n_s_1_1bitfield}{}\doxysection{KBLIB\+\_\+\+NS\+::bitfield\texorpdfstring{$<$}{<} offset, size, Storage \texorpdfstring{$>$}{>} Struct Template Reference} \label{struct_k_b_l_i_b___n_s_1_1bitfield}\index{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}} Implements a bitfield abstraction. May be used in a union with other bitfields. {\ttfamily \#include $<$kblib/bits.\+h$>$} \doxysubsection*{Public Member Functions} \begin{DoxyCompactItemize} \item auto \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield_ad5dcc81463f08b429518c98d2b63a0de}{operator()}} () const noexcept -\/$>$ Storage \item auto \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield_ad3a2be82c3a37298df4d2011fd9fc5c3}{operator()}} (const Storage val) noexcept -\/$>$ Storage \item \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield_af252608b1b1429d21bbe5bb88759de4c}{operator Storage}} () const noexcept \item auto \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield_a3bc80e0400dfcd2f38fe86f91523b77e}{operator=}} (Storage val) noexcept -\/$>$ Storage \item Storage \& \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield_adb973d14f3cba2b9a1ce5bfb0691667b}{get}} () noexcept \item const Storage \& \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield_aabeed99019b587eaef0f490ec633388b}{get}} () const noexcept \item auto \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield_a0cad67f0f4f0c3038e8298cc5389c717}{operator\&}} () -\/$>$ void=delete \end{DoxyCompactItemize} \doxysubsection*{Public Attributes} \begin{DoxyCompactItemize} \item Storage \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield_a1aa026d37251f03f2579535d6fe3fef5}{raw\+\_\+}} \end{DoxyCompactItemize} \doxysubsection{Detailed Description} \subsubsection*{template$<$unsigned offset, unsigned size, typename Storage$>$\newline struct KBLIB\+\_\+\+NS\+::bitfield$<$ offset, size, Storage $>$} Implements a bitfield abstraction. May be used in a union with other bitfields. In C++20, \mbox{[}\mbox{[}no\+\_\+unique\+\_\+address\mbox{]}\mbox{]} will enable a better implementation which will work in non-\/union structs, as long as no two bitfields name the same exact bits. (\mbox{[}\mbox{[}no\+\_\+unique\+\_\+address\mbox{]}\mbox{]} allows empty objects of different types to be allocated at the same location, but distinct objects of the same type must have distinct addresses, \mbox{[}\mbox{[}no\+\_\+unique\+\_\+address\mbox{]}\mbox{]} notwithstanding. This does not apply to unions, though.) \begin{DoxyTemplParams}{Template Parameters} {\em offset} & The number of bits less significant than the bitfield. \\ \hline {\em size} & The number of bits constituting this bitfield. \\ \hline {\em Storage} & The underlying type which stores the bits. \\ \hline \end{DoxyTemplParams} Definition at line \mbox{\hyperlink{bits_8h_source_l00437}{437}} of file \mbox{\hyperlink{bits_8h_source}{bits.\+h}}. \doxysubsection{Member Function Documentation} \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1bitfield_aabeed99019b587eaef0f490ec633388b}\label{struct_k_b_l_i_b___n_s_1_1bitfield_aabeed99019b587eaef0f490ec633388b}} \index{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}!get@{get}} \index{get@{get}!KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{get()}{get()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ const Storage \& \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield}{KBLIB\+\_\+\+NS\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_a4c92ee94a7a250948d44a29b0e7b3e78}{size}}, Storage $>$\+::get (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}} Definition at line \mbox{\hyperlink{bits_8h_source_l00453}{453}} of file \mbox{\hyperlink{bits_8h_source}{bits.\+h}}. \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1bitfield_adb973d14f3cba2b9a1ce5bfb0691667b}\label{struct_k_b_l_i_b___n_s_1_1bitfield_adb973d14f3cba2b9a1ce5bfb0691667b}} \index{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}!get@{get}} \index{get@{get}!KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{get()}{get()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ Storage \& \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield}{KBLIB\+\_\+\+NS\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_a4c92ee94a7a250948d44a29b0e7b3e78}{size}}, Storage $>$\+::get (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}} Definition at line \mbox{\hyperlink{bits_8h_source_l00452}{452}} of file \mbox{\hyperlink{bits_8h_source}{bits.\+h}}. \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1bitfield_af252608b1b1429d21bbe5bb88759de4c}\label{struct_k_b_l_i_b___n_s_1_1bitfield_af252608b1b1429d21bbe5bb88759de4c}} \index{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}!operator Storage@{operator Storage}} \index{operator Storage@{operator Storage}!KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{operator Storage()}{operator Storage()}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield}{KBLIB\+\_\+\+NS\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_a4c92ee94a7a250948d44a29b0e7b3e78}{size}}, Storage $>$\+::operator Storage (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}} Definition at line \mbox{\hyperlink{bits_8h_source_l00448}{448}} of file \mbox{\hyperlink{bits_8h_source}{bits.\+h}}. \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1bitfield_a0cad67f0f4f0c3038e8298cc5389c717}\label{struct_k_b_l_i_b___n_s_1_1bitfield_a0cad67f0f4f0c3038e8298cc5389c717}} \index{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}!operator\&@{operator\&}} \index{operator\&@{operator\&}!KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{operator\&()}{operator\&()}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ auto \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield}{KBLIB\+\_\+\+NS\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_a4c92ee94a7a250948d44a29b0e7b3e78}{size}}, Storage $>$\+::operator\& (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) -\/$>$ void=delete\hspace{0.3cm}{\ttfamily [delete]}} \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1bitfield_ad5dcc81463f08b429518c98d2b63a0de}\label{struct_k_b_l_i_b___n_s_1_1bitfield_ad5dcc81463f08b429518c98d2b63a0de}} \index{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}!operator()@{operator()}} \index{operator()@{operator()}!KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{operator()()}{operator()()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ auto \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield}{KBLIB\+\_\+\+NS\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_a4c92ee94a7a250948d44a29b0e7b3e78}{size}}, Storage $>$\+::operator() (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const -\/$>$ Storage \hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}} Definition at line \mbox{\hyperlink{bits_8h_source_l00438}{438}} of file \mbox{\hyperlink{bits_8h_source}{bits.\+h}}. \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1bitfield_ad3a2be82c3a37298df4d2011fd9fc5c3}\label{struct_k_b_l_i_b___n_s_1_1bitfield_ad3a2be82c3a37298df4d2011fd9fc5c3}} \index{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}!operator()@{operator()}} \index{operator()@{operator()}!KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{operator()()}{operator()()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ auto \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield}{KBLIB\+\_\+\+NS\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_a4c92ee94a7a250948d44a29b0e7b3e78}{size}}, Storage $>$\+::operator() (\begin{DoxyParamCaption}\item[{const Storage}]{val }\end{DoxyParamCaption}) -\/$>$ Storage \hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}} Definition at line \mbox{\hyperlink{bits_8h_source_l00441}{441}} of file \mbox{\hyperlink{bits_8h_source}{bits.\+h}}. \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1bitfield_a3bc80e0400dfcd2f38fe86f91523b77e}\label{struct_k_b_l_i_b___n_s_1_1bitfield_a3bc80e0400dfcd2f38fe86f91523b77e}} \index{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}!operator=@{operator=}} \index{operator=@{operator=}!KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{operator=()}{operator=()}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ auto \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield}{KBLIB\+\_\+\+NS\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_a4c92ee94a7a250948d44a29b0e7b3e78}{size}}, Storage $>$\+::operator= (\begin{DoxyParamCaption}\item[{Storage}]{val }\end{DoxyParamCaption}) -\/$>$ Storage \hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}} Definition at line \mbox{\hyperlink{bits_8h_source_l00449}{449}} of file \mbox{\hyperlink{bits_8h_source}{bits.\+h}}. \doxysubsection{Member Data Documentation} \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1bitfield_a1aa026d37251f03f2579535d6fe3fef5}\label{struct_k_b_l_i_b___n_s_1_1bitfield_a1aa026d37251f03f2579535d6fe3fef5}} \index{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}!raw\_@{raw\_}} \index{raw\_@{raw\_}!KBLIB\_NS::bitfield$<$ offset, size, Storage $>$@{KBLIB\_NS::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{raw\_}{raw\_}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ Storage \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1bitfield}{KBLIB\+\_\+\+NS\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_a4c92ee94a7a250948d44a29b0e7b3e78}{size}}, Storage $>$\+::raw\+\_\+} Definition at line \mbox{\hyperlink{bits_8h_source_l00457}{457}} of file \mbox{\hyperlink{bits_8h_source}{bits.\+h}}. The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} \item kblib/\mbox{\hyperlink{bits_8h}{bits.\+h}}\end{DoxyCompactItemize}