\hypertarget{structkblib_1_1poly__obj__traits}{}\doxysection{kblib\+::poly\+\_\+obj\+\_\+traits\texorpdfstring{$<$}{<} Obj, CType \texorpdfstring{$>$}{>} Struct Template Reference}
\label{structkblib_1_1poly__obj__traits}\index{kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}}


\mbox{\hyperlink{structkblib_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{structkblib_1_1poly__obj__traits_a03b2953cb6e3df1a64ef4bff6afa93e8}{copy\+\_\+t}} = \mbox{\hyperlink{structkblib_1_1default__copy}{default\+\_\+copy}}$<$ Obj, \mbox{\hyperlink{structkblib_1_1poly__obj__traits_ac43bc6b7443b6009a1d6d255bc02b131}{copyable}} $>$
\begin{DoxyCompactList}\small\item\em Implements type erasure for copy construction. \end{DoxyCompactList}\item 
using \mbox{\hyperlink{structkblib_1_1poly__obj__traits_a487c8a93bae7ffde17a92bb02e99988d}{move\+\_\+t}} = \mbox{\hyperlink{structkblib_1_1default__move}{default\+\_\+move}}$<$ Obj, \mbox{\hyperlink{structkblib_1_1poly__obj__traits_a614674cd3a2ae649d5fe60b5b14695fa}{movable}}, \mbox{\hyperlink{structkblib_1_1poly__obj__traits_af5e3a1c7b48c95a7276f85566400c7d1}{nothrow\+\_\+movable}}, \mbox{\hyperlink{structkblib_1_1poly__obj__traits_ac43bc6b7443b6009a1d6d255bc02b131}{copyable}} $>$
\begin{DoxyCompactList}\small\item\em Implements type erasure for move construction. \end{DoxyCompactList}\item 
using \mbox{\hyperlink{structkblib_1_1poly__obj__traits_aec014c9dea78dc660d62277f17f9e367}{destroy\+\_\+t}} = \mbox{\hyperlink{structkblib_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{structkblib_1_1poly__obj__traits_a49bde19820a591802e7c80c4f200385a}{default\+\_\+capacity}} = \mbox{\hyperlink{structkblib_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{structkblib_1_1poly__obj__traits_ab38edf9610d6aec9da89a4605f789ef5}{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{structkblib_1_1poly__obj__traits_ac43bc6b7443b6009a1d6d255bc02b131}{copyable}} = detail\+\_\+poly\+::copyable(CType)
\begin{DoxyCompactList}\small\item\em If the object is copy constructible. \end{DoxyCompactList}\item 
static constexpr bool \mbox{\hyperlink{structkblib_1_1poly__obj__traits_a614674cd3a2ae649d5fe60b5b14695fa}{movable}} = detail\+\_\+poly\+::movable(CType)
\begin{DoxyCompactList}\small\item\em If the object is move constructible. \end{DoxyCompactList}\item 
static constexpr bool \mbox{\hyperlink{structkblib_1_1poly__obj__traits_af5e3a1c7b48c95a7276f85566400c7d1}{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{namespacekblib_a2cc6d0e618d41f45deaaa5c6c357ed7a}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$\newline
struct kblib\+::poly\+\_\+obj\+\_\+traits$<$ Obj, CType $>$}
\mbox{\hyperlink{structkblib_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{classkblib_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{structkblib_1_1poly__obj__traits_a03b2953cb6e3df1a64ef4bff6afa93e8}\label{structkblib_1_1poly__obj__traits_a03b2953cb6e3df1a64ef4bff6afa93e8}} 
\index{kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}!copy\_t@{copy\_t}}
\index{copy\_t@{copy\_t}!kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}}
\doxysubsubsection{\texorpdfstring{copy\_t}{copy\_t}}
{\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespacekblib_a2cc6d0e618d41f45deaaa5c6c357ed7a}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\
using \mbox{\hyperlink{structkblib_1_1poly__obj__traits}{kblib\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::copy\+\_\+t =  \mbox{\hyperlink{structkblib_1_1default__copy}{default\+\_\+copy}}$<$Obj, \mbox{\hyperlink{structkblib_1_1poly__obj__traits_ac43bc6b7443b6009a1d6d255bc02b131}{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}
\mbox{\hyperlink{structkblib_1_1default__copy}{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{structkblib_1_1poly__obj__traits_aec014c9dea78dc660d62277f17f9e367}\label{structkblib_1_1poly__obj__traits_aec014c9dea78dc660d62277f17f9e367}} 
\index{kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}!destroy\_t@{destroy\_t}}
\index{destroy\_t@{destroy\_t}!kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}}
\doxysubsubsection{\texorpdfstring{destroy\_t}{destroy\_t}}
{\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespacekblib_a2cc6d0e618d41f45deaaa5c6c357ed7a}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\
using \mbox{\hyperlink{structkblib_1_1poly__obj__traits}{kblib\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::destroy\+\_\+t =  \mbox{\hyperlink{structkblib_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}
\mbox{\hyperlink{structkblib_1_1default__destroy}{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{structkblib_1_1poly__obj__traits_a487c8a93bae7ffde17a92bb02e99988d}\label{structkblib_1_1poly__obj__traits_a487c8a93bae7ffde17a92bb02e99988d}} 
\index{kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}!move\_t@{move\_t}}
\index{move\_t@{move\_t}!kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}}
\doxysubsubsection{\texorpdfstring{move\_t}{move\_t}}
{\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespacekblib_a2cc6d0e618d41f45deaaa5c6c357ed7a}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\
using \mbox{\hyperlink{structkblib_1_1poly__obj__traits}{kblib\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::move\+\_\+t =  \mbox{\hyperlink{structkblib_1_1default__move}{default\+\_\+move}}$<$Obj, \mbox{\hyperlink{structkblib_1_1poly__obj__traits_a614674cd3a2ae649d5fe60b5b14695fa}{movable}}, \mbox{\hyperlink{structkblib_1_1poly__obj__traits_af5e3a1c7b48c95a7276f85566400c7d1}{nothrow\+\_\+movable}}, \mbox{\hyperlink{structkblib_1_1poly__obj__traits_ac43bc6b7443b6009a1d6d255bc02b131}{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}
\mbox{\hyperlink{structkblib_1_1default__move}{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{structkblib_1_1poly__obj__traits_ab38edf9610d6aec9da89a4605f789ef5}\label{structkblib_1_1poly__obj__traits_ab38edf9610d6aec9da89a4605f789ef5}} 
\index{kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}!alignment@{alignment}}
\index{alignment@{alignment}!kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}}
\doxysubsubsection{\texorpdfstring{alignment}{alignment}}
{\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespacekblib_a2cc6d0e618d41f45deaaa5c6c357ed7a}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\
constexpr std\+::size\+\_\+t \mbox{\hyperlink{structkblib_1_1poly__obj__traits}{kblib\+::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{structkblib_1_1poly__obj__traits_ac43bc6b7443b6009a1d6d255bc02b131}\label{structkblib_1_1poly__obj__traits_ac43bc6b7443b6009a1d6d255bc02b131}} 
\index{kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}!copyable@{copyable}}
\index{copyable@{copyable}!kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}}
\doxysubsubsection{\texorpdfstring{copyable}{copyable}}
{\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespacekblib_a2cc6d0e618d41f45deaaa5c6c357ed7a}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\
constexpr bool \mbox{\hyperlink{structkblib_1_1poly__obj__traits}{kblib\+::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{structkblib_1_1poly__obj__traits_a49bde19820a591802e7c80c4f200385a}\label{structkblib_1_1poly__obj__traits_a49bde19820a591802e7c80c4f200385a}} 
\index{kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}!default\_capacity@{default\_capacity}}
\index{default\_capacity@{default\_capacity}!kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}}
\doxysubsubsection{\texorpdfstring{default\_capacity}{default\_capacity}}
{\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespacekblib_a2cc6d0e618d41f45deaaa5c6c357ed7a}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\
constexpr std\+::size\+\_\+t \mbox{\hyperlink{structkblib_1_1poly__obj__traits}{kblib\+::poly\+\_\+obj\+\_\+traits}}$<$ Obj, CType $>$\+::default\+\_\+capacity = \mbox{\hyperlink{structkblib_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{structkblib_1_1poly__obj__traits_a614674cd3a2ae649d5fe60b5b14695fa}\label{structkblib_1_1poly__obj__traits_a614674cd3a2ae649d5fe60b5b14695fa}} 
\index{kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}!movable@{movable}}
\index{movable@{movable}!kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}}
\doxysubsubsection{\texorpdfstring{movable}{movable}}
{\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespacekblib_a2cc6d0e618d41f45deaaa5c6c357ed7a}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\
constexpr bool \mbox{\hyperlink{structkblib_1_1poly__obj__traits}{kblib\+::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{structkblib_1_1poly__obj__traits_af5e3a1c7b48c95a7276f85566400c7d1}\label{structkblib_1_1poly__obj__traits_af5e3a1c7b48c95a7276f85566400c7d1}} 
\index{kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}!nothrow\_movable@{nothrow\_movable}}
\index{nothrow\_movable@{nothrow\_movable}!kblib::poly\_obj\_traits$<$ Obj, CType $>$@{kblib::poly\_obj\_traits$<$ Obj, CType $>$}}
\doxysubsubsection{\texorpdfstring{nothrow\_movable}{nothrow\_movable}}
{\footnotesize\ttfamily template$<$typename Obj , \mbox{\hyperlink{namespacekblib_a2cc6d0e618d41f45deaaa5c6c357ed7a}{construct\+\_\+type}} CType = detail\+\_\+poly\+::construct\+\_\+traits$<$\+Obj$>$$>$ \\
constexpr bool \mbox{\hyperlink{structkblib_1_1poly__obj__traits}{kblib\+::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}
