\hypertarget{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}{}\doxysection{KBLIB\+\_\+\+NS\+::poly\+\_\+obj\+\_\+traits\texorpdfstring{$<$}{<} Obj, CType \texorpdfstring{$>$}{>} Struct Template Reference} \label{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}\index{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}} \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}{poly\+\_\+obj\+\_\+traits}} is a traits class template which abstracts the allowed operations on a polymorphic type hierarchy. Any operation allowed by the traits must be usable for the entire hierarchy, not just the base class. {\ttfamily \#include $<$kblib/poly\+\_\+obj.\+h$>$} \doxysubsection*{Public Types} \begin{DoxyCompactItemize} \item using \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a1a0aee12b60371cca434ca94b21f4d80}{copy\+\_\+t}} = \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1default__copy}{default\+\_\+copy}}$<$ Obj, \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_ae85b04816052ced2625a2753ba90d973}{copyable}} $>$ \begin{DoxyCompactList}\small\item\em Implements type erasure for copy construction. \end{DoxyCompactList}\item using \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_ace456a745e9d9d24d7593a11d9762680}{move\+\_\+t}} = \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1default__move}{default\+\_\+move}}$<$ Obj, \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a8ce8b6ba3af8604cc9a79e959d1cfca6}{movable}}, \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a57b0943187bc5f5a08af8b2218a28032}{nothrow\+\_\+movable}}, \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_ae85b04816052ced2625a2753ba90d973}{copyable}} $>$ \begin{DoxyCompactList}\small\item\em Implements type erasure for move construction. \end{DoxyCompactList}\item using \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a0b663018357a169385c1706453b32b77}{destroy\+\_\+t}} = \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1default__destroy}{default\+\_\+destroy}}$<$ Obj $>$ \begin{DoxyCompactList}\small\item\em Implements type erasure for destruction. The default implementation requires and always uses virtual dispatch for destruction. \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection*{Static Public Attributes} \begin{DoxyCompactItemize} \item static constexpr std\+::size\+\_\+t \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a9cad633df781c1e88618fcef8cdff198}{default\+\_\+capacity}} = \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1detail__poly_1_1extract__derived__size}{detail\+\_\+poly\+::extract\+\_\+derived\+\_\+size}}$<$Obj$>$\+::value \begin{DoxyCompactList}\small\item\em The default capacity to use if not overridden. \end{DoxyCompactList}\item static constexpr std\+::size\+\_\+t \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_aef4862ce5709809963722d92a132f4be}{alignment}} = std\+::max(alignof(Obj), alignof(std\+::max\+\_\+align\+\_\+t)) \begin{DoxyCompactList}\small\item\em How much to align the storage by. \end{DoxyCompactList}\item static constexpr bool \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_ae85b04816052ced2625a2753ba90d973}{copyable}} = detail\+\_\+poly\+::copyable(CType) \begin{DoxyCompactList}\small\item\em If the object is copy constructible. \end{DoxyCompactList}\item static constexpr bool \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a8ce8b6ba3af8604cc9a79e959d1cfca6}{movable}} = detail\+\_\+poly\+::movable(CType) \begin{DoxyCompactList}\small\item\em If the object is move constructible. \end{DoxyCompactList}\item static constexpr bool \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a57b0943187bc5f5a08af8b2218a28032}{nothrow\+\_\+movable}} = detail\+\_\+poly\+::nothrow\+\_\+movable(CType) \begin{DoxyCompactList}\small\item\em If the object is nothrow move constructible. \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection{Detailed Description} \subsubsection*{template$<$typename Obj, \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_ab80deb5b155636cc83afb4be1f83ae8e}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$\newline struct KBLIB\+\_\+\+NS\+::poly\+\_\+obj\+\_\+traits$<$ Obj, CType $>$} \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}{poly\+\_\+obj\+\_\+traits}} is a traits class template which abstracts the allowed operations on a polymorphic type hierarchy. Any operation allowed by the traits must be usable for the entire hierarchy, not just the base class. Users of \mbox{\hyperlink{class_k_b_l_i_b___n_s_1_1poly__obj}{poly\+\_\+obj}} may provide explicit specializations of this type, as long as they satisfy all the requirements listed here. Alternatively, users may write their own traits types, subject to the same restrictions. Definition at line \mbox{\hyperlink{poly__obj_8h_source_l00374}{374}} of file \mbox{\hyperlink{poly__obj_8h_source}{poly\+\_\+obj.\+h}}. \doxysubsection{Member Typedef Documentation} \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a1a0aee12b60371cca434ca94b21f4d80}\label{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a1a0aee12b60371cca434ca94b21f4d80}} \index{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}!copy\_t@{copy\_t}} \index{copy\_t@{copy\_t}!KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}} \doxysubsubsection{\texorpdfstring{copy\_t}{copy\_t}} {\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_ab80deb5b155636cc83afb4be1f83ae8e}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\ using \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}{KBLIB\+\_\+\+NS\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::copy\+\_\+t = \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1default__copy}{default\+\_\+copy}}$<$Obj, \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_ae85b04816052ced2625a2753ba90d973}{copyable}}$>$} Implements type erasure for copy construction. Must be assignable. If copying is enabled, copy\+\_\+t must have\+: \begin{DoxyItemize} \item a nothrow default constructor. \item a nothrow constructor template taking a single parameter of type T$\ast$ (always nullptr) that produces a copy constructor for type T. \item a member function \textquotesingle{}copy\textquotesingle{} which performs the actual copying. \end{DoxyItemize} \begin{DoxySeeAlso}{See also} kblib\+::default\+\_\+copy \end{DoxySeeAlso} Definition at line \mbox{\hyperlink{poly__obj_8h_source_l00417}{417}} of file \mbox{\hyperlink{poly__obj_8h_source}{poly\+\_\+obj.\+h}}. \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a0b663018357a169385c1706453b32b77}\label{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a0b663018357a169385c1706453b32b77}} \index{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}!destroy\_t@{destroy\_t}} \index{destroy\_t@{destroy\_t}!KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}} \doxysubsubsection{\texorpdfstring{destroy\_t}{destroy\_t}} {\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_ab80deb5b155636cc83afb4be1f83ae8e}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\ using \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}{KBLIB\+\_\+\+NS\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::destroy\+\_\+t = \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1default__destroy}{default\+\_\+destroy}}$<$Obj$>$} Implements type erasure for destruction. The default implementation requires and always uses virtual dispatch for destruction. Must be assignable. Must have\+: \begin{DoxyItemize} \item a nothrow default constructor. \item a nothrow constructor template taking a single parameter of type T$\ast$ (always nullptr) that produces a destroyer for type T. \item a member function \textquotesingle{}destroy\textquotesingle{} which performs the actual destruction. \end{DoxyItemize} \begin{DoxySeeAlso}{See also} kblib\+::default\+\_\+destroy \end{DoxySeeAlso} Definition at line \mbox{\hyperlink{poly__obj_8h_source_l00447}{447}} of file \mbox{\hyperlink{poly__obj_8h_source}{poly\+\_\+obj.\+h}}. \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_ace456a745e9d9d24d7593a11d9762680}\label{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_ace456a745e9d9d24d7593a11d9762680}} \index{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}!move\_t@{move\_t}} \index{move\_t@{move\_t}!KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}} \doxysubsubsection{\texorpdfstring{move\_t}{move\_t}} {\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_ab80deb5b155636cc83afb4be1f83ae8e}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\ using \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}{KBLIB\+\_\+\+NS\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::move\+\_\+t = \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1default__move}{default\+\_\+move}}$<$Obj, \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a8ce8b6ba3af8604cc9a79e959d1cfca6}{movable}}, \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a57b0943187bc5f5a08af8b2218a28032}{nothrow\+\_\+movable}}, \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_ae85b04816052ced2625a2753ba90d973}{copyable}}$>$} Implements type erasure for move construction. Must be assignable. If moving is enabled, move\+\_\+t must have\+: \begin{DoxyItemize} \item a nothrow default constructor. \item a nothrow constructor template taking a single parameter of type T$\ast$ (always nullptr) that produces a move constructor for type T. \item a member function \textquotesingle{}move\textquotesingle{} which performs the actual moving. \end{DoxyItemize} \begin{DoxyNote}{Note} Move may fall back on copy. \end{DoxyNote} \begin{DoxySeeAlso}{See also} kblib\+::default\+\_\+move \end{DoxySeeAlso} Definition at line \mbox{\hyperlink{poly__obj_8h_source_l00432}{432}} of file \mbox{\hyperlink{poly__obj_8h_source}{poly\+\_\+obj.\+h}}. \doxysubsection{Member Data Documentation} \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_aef4862ce5709809963722d92a132f4be}\label{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_aef4862ce5709809963722d92a132f4be}} \index{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}!alignment@{alignment}} \index{alignment@{alignment}!KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}} \doxysubsubsection{\texorpdfstring{alignment}{alignment}} {\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_ab80deb5b155636cc83afb4be1f83ae8e}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\ constexpr std\+::size\+\_\+t \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}{KBLIB\+\_\+\+NS\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::alignment = std\+::max(alignof(Obj), alignof(std\+::max\+\_\+align\+\_\+t))\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [constexpr]}} How much to align the storage by. Definition at line \mbox{\hyperlink{poly__obj_8h_source_l00388}{388}} of file \mbox{\hyperlink{poly__obj_8h_source}{poly\+\_\+obj.\+h}}. \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_ae85b04816052ced2625a2753ba90d973}\label{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_ae85b04816052ced2625a2753ba90d973}} \index{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}!copyable@{copyable}} \index{copyable@{copyable}!KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}} \doxysubsubsection{\texorpdfstring{copyable}{copyable}} {\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_ab80deb5b155636cc83afb4be1f83ae8e}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\ constexpr bool \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}{KBLIB\+\_\+\+NS\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::copyable = detail\+\_\+poly\+::copyable(CType)\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [constexpr]}} If the object is copy constructible. Definition at line \mbox{\hyperlink{poly__obj_8h_source_l00394}{394}} of file \mbox{\hyperlink{poly__obj_8h_source}{poly\+\_\+obj.\+h}}. \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a9cad633df781c1e88618fcef8cdff198}\label{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a9cad633df781c1e88618fcef8cdff198}} \index{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}!default\_capacity@{default\_capacity}} \index{default\_capacity@{default\_capacity}!KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}} \doxysubsubsection{\texorpdfstring{default\_capacity}{default\_capacity}} {\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_ab80deb5b155636cc83afb4be1f83ae8e}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\ constexpr std\+::size\+\_\+t \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}{KBLIB\+\_\+\+NS\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::default\+\_\+capacity = \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1detail__poly_1_1extract__derived__size}{detail\+\_\+poly\+::extract\+\_\+derived\+\_\+size}}$<$Obj$>$\+::value\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [constexpr]}} The default capacity to use if not overridden. The default implementation uses Obj\+::max\+\_\+derived\+\_\+size if it exists, or sizeof(\+Obj) otherwise. Definition at line \mbox{\hyperlink{poly__obj_8h_source_l00382}{382}} of file \mbox{\hyperlink{poly__obj_8h_source}{poly\+\_\+obj.\+h}}. \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a8ce8b6ba3af8604cc9a79e959d1cfca6}\label{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a8ce8b6ba3af8604cc9a79e959d1cfca6}} \index{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}!movable@{movable}} \index{movable@{movable}!KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}} \doxysubsubsection{\texorpdfstring{movable}{movable}} {\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_ab80deb5b155636cc83afb4be1f83ae8e}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\ constexpr bool \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}{KBLIB\+\_\+\+NS\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::movable = detail\+\_\+poly\+::movable(CType)\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [constexpr]}} If the object is move constructible. Definition at line \mbox{\hyperlink{poly__obj_8h_source_l00399}{399}} of file \mbox{\hyperlink{poly__obj_8h_source}{poly\+\_\+obj.\+h}}. \mbox{\Hypertarget{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a57b0943187bc5f5a08af8b2218a28032}\label{struct_k_b_l_i_b___n_s_1_1poly__obj__traits_a57b0943187bc5f5a08af8b2218a28032}} \index{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}!nothrow\_movable@{nothrow\_movable}} \index{nothrow\_movable@{nothrow\_movable}!KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$@{KBLIB\_NS::poly\_obj\_traits$<$ Obj, CType $>$}} \doxysubsubsection{\texorpdfstring{nothrow\_movable}{nothrow\_movable}} {\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespace_k_b_l_i_b___n_s_ab80deb5b155636cc83afb4be1f83ae8e}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\ constexpr bool \mbox{\hyperlink{struct_k_b_l_i_b___n_s_1_1poly__obj__traits}{KBLIB\+\_\+\+NS\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::nothrow\+\_\+movable = detail\+\_\+poly\+::nothrow\+\_\+movable(CType)\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [constexpr]}} If the object is nothrow move constructible. Definition at line \mbox{\hyperlink{poly__obj_8h_source_l00403}{403}} of file \mbox{\hyperlink{poly__obj_8h_source}{poly\+\_\+obj.\+h}}. The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} \item kblib/\mbox{\hyperlink{poly__obj_8h}{poly\+\_\+obj.\+h}}\end{DoxyCompactItemize}