\hypertarget{structkblib_1_1bitfield}{}\doxysection{kblib\+::bitfield\texorpdfstring{$<$}{<} offset, size, Storage \texorpdfstring{$>$}{>} Struct Template Reference} \label{structkblib_1_1bitfield}\index{kblib::bitfield$<$ offset, size, Storage $>$@{kblib::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{structkblib_1_1bitfield_a94ce5df7945a975c6a79245971ba0744}{operator()}} () const noexcept -\/$>$ Storage \item auto \mbox{\hyperlink{structkblib_1_1bitfield_a4e37815a104b48dc55dca23414edaee0}{operator()}} (const Storage val) noexcept -\/$>$ Storage \item \mbox{\hyperlink{structkblib_1_1bitfield_a0c8646d544a0fce41b183e7a52c45877}{operator Storage}} () const noexcept \item auto \mbox{\hyperlink{structkblib_1_1bitfield_afd301ce41a80fe9c2c48d3bd9d8c812e}{operator=}} (Storage val) noexcept -\/$>$ Storage \item Storage \& \mbox{\hyperlink{structkblib_1_1bitfield_a5dda3b597cf066223205c49ad684b851}{get}} () noexcept \item const Storage \& \mbox{\hyperlink{structkblib_1_1bitfield_a0bb0d9b5548f5f0e8902ad7609b6ccea}{get}} () const noexcept \item auto \mbox{\hyperlink{structkblib_1_1bitfield_a48836d3d35d8abb7b6747de63f417108}{operator\&}} () -\/$>$ void=delete \end{DoxyCompactItemize} \doxysubsection*{Public Attributes} \begin{DoxyCompactItemize} \item Storage \mbox{\hyperlink{structkblib_1_1bitfield_a18e4383e64f808396a4a9beaba1ec59c}{raw\+\_\+}} \end{DoxyCompactItemize} \doxysubsection{Detailed Description} \subsubsection*{template$<$unsigned offset, unsigned size, typename Storage$>$\newline struct kblib\+::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{structkblib_1_1bitfield_a0bb0d9b5548f5f0e8902ad7609b6ccea}\label{structkblib_1_1bitfield_a0bb0d9b5548f5f0e8902ad7609b6ccea}} \index{kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}!get@{get}} \index{get@{get}!kblib::bitfield$<$ offset, size, Storage $>$@{kblib::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{structkblib_1_1bitfield}{kblib\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespacekblib_a0e74aee94f446396c8f8b7bf34b16acb}{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{structkblib_1_1bitfield_a5dda3b597cf066223205c49ad684b851}\label{structkblib_1_1bitfield_a5dda3b597cf066223205c49ad684b851}} \index{kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}!get@{get}} \index{get@{get}!kblib::bitfield$<$ offset, size, Storage $>$@{kblib::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{structkblib_1_1bitfield}{kblib\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespacekblib_a0e74aee94f446396c8f8b7bf34b16acb}{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{structkblib_1_1bitfield_a0c8646d544a0fce41b183e7a52c45877}\label{structkblib_1_1bitfield_a0c8646d544a0fce41b183e7a52c45877}} \index{kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}!operator Storage@{operator Storage}} \index{operator Storage@{operator Storage}!kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{operator Storage()}{operator Storage()}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ \mbox{\hyperlink{structkblib_1_1bitfield}{kblib\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespacekblib_a0e74aee94f446396c8f8b7bf34b16acb}{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{structkblib_1_1bitfield_a48836d3d35d8abb7b6747de63f417108}\label{structkblib_1_1bitfield_a48836d3d35d8abb7b6747de63f417108}} \index{kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}!operator\&@{operator\&}} \index{operator\&@{operator\&}!kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{operator\&()}{operator\&()}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ auto \mbox{\hyperlink{structkblib_1_1bitfield}{kblib\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespacekblib_a0e74aee94f446396c8f8b7bf34b16acb}{size}}, Storage $>$\+::operator\& (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) -\/$>$ void=delete\hspace{0.3cm}{\ttfamily [delete]}} \mbox{\Hypertarget{structkblib_1_1bitfield_a94ce5df7945a975c6a79245971ba0744}\label{structkblib_1_1bitfield_a94ce5df7945a975c6a79245971ba0744}} \index{kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}!operator()@{operator()}} \index{operator()@{operator()}!kblib::bitfield$<$ offset, size, Storage $>$@{kblib::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{structkblib_1_1bitfield}{kblib\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespacekblib_a0e74aee94f446396c8f8b7bf34b16acb}{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{structkblib_1_1bitfield_a4e37815a104b48dc55dca23414edaee0}\label{structkblib_1_1bitfield_a4e37815a104b48dc55dca23414edaee0}} \index{kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}!operator()@{operator()}} \index{operator()@{operator()}!kblib::bitfield$<$ offset, size, Storage $>$@{kblib::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{structkblib_1_1bitfield}{kblib\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespacekblib_a0e74aee94f446396c8f8b7bf34b16acb}{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{structkblib_1_1bitfield_afd301ce41a80fe9c2c48d3bd9d8c812e}\label{structkblib_1_1bitfield_afd301ce41a80fe9c2c48d3bd9d8c812e}} \index{kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}!operator=@{operator=}} \index{operator=@{operator=}!kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{operator=()}{operator=()}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ auto \mbox{\hyperlink{structkblib_1_1bitfield}{kblib\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespacekblib_a0e74aee94f446396c8f8b7bf34b16acb}{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{structkblib_1_1bitfield_a18e4383e64f808396a4a9beaba1ec59c}\label{structkblib_1_1bitfield_a18e4383e64f808396a4a9beaba1ec59c}} \index{kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}!raw\_@{raw\_}} \index{raw\_@{raw\_}!kblib::bitfield$<$ offset, size, Storage $>$@{kblib::bitfield$<$ offset, size, Storage $>$}} \doxysubsubsection{\texorpdfstring{raw\_}{raw\_}} {\footnotesize\ttfamily template$<$unsigned offset, unsigned size, typename Storage $>$ \\ Storage \mbox{\hyperlink{structkblib_1_1bitfield}{kblib\+::bitfield}}$<$ offset, \mbox{\hyperlink{namespacekblib_a0e74aee94f446396c8f8b7bf34b16acb}{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}