\doxysection{gko::\+Enable\+Polymorphic\+Assignment\texorpdfstring{$<$}{<} Concrete\+Type, Result\+Type \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{classgko_1_1EnablePolymorphicAssignment}{}\label{classgko_1_1EnablePolymorphicAssignment}\index{gko::EnablePolymorphicAssignment$<$ ConcreteType, ResultType $>$@{gko::EnablePolymorphicAssignment$<$ ConcreteType, ResultType $>$}}


This mixin is used to enable a default \doxylink{classgko_1_1PolymorphicObject_a3c431a34c3ad724e1337b73165f1da9b}{Polymorphic\+Object::\+copy\+\_\+from()} implementation for objects that have implemented conversions between them.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+base/\+polymorphic\+\_\+object.\+hpp$>$}



Inherits Convertible\+To$<$ Concrete\+Type $>$.



Inherited by \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1Partition}{gko::\+experimental::\+distributed::\+\+Partition$<$ Local\+Index\+Type, Global\+Index\+Type $>$}}.



Collaboration diagram for gko::\+Enable\+Polymorphic\+Assignment\texorpdfstring{$<$}{<} Concrete\+Type, Result\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=254pt]{classgko_1_1EnablePolymorphicAssignment__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1EnablePolymorphicAssignment_a2e92aa4e8262a8f6625330b76a24deeb}\label{classgko_1_1EnablePolymorphicAssignment_a2e92aa4e8262a8f6625330b76a24deeb} 
using {\bfseries result\+\_\+type} = Result\+Type
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1EnablePolymorphicAssignment_a6b7e6872e96084636f8ab5091063ada8}\label{classgko_1_1EnablePolymorphicAssignment_a6b7e6872e96084636f8ab5091063ada8} 
void {\bfseries convert\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) const override
\item 
\Hypertarget{classgko_1_1EnablePolymorphicAssignment_a0a4cf244139e7761d6a91c61e029810e}\label{classgko_1_1EnablePolymorphicAssignment_a0a4cf244139e7761d6a91c61e029810e} 
void {\bfseries move\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) override
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Concrete\+Type, typename Result\+Type = Concrete\+Type$>$\newline
class gko::\+\+Enable\+Polymorphic\+Assignment$<$ Concrete\+Type, Result\+Type $>$}
This mixin is used to enable a default \doxylink{classgko_1_1PolymorphicObject_a3c431a34c3ad724e1337b73165f1da9b}{Polymorphic\+Object::\+copy\+\_\+from()} implementation for objects that have implemented conversions between them. 

The requirement is that there is either a conversion constructor from {\ttfamily Concrete\+Type} in {\ttfamily Result\+Type}, or a conversion operator to {\ttfamily Result\+Type} in {\ttfamily Concrete\+Type}.


\begin{DoxyTemplParams}{Template Parameters}
{\em Concrete\+Type} & the concrete type from which the copy\+\_\+from is being enabled \+[CRTP parameter]\+ \\
\hline
{\em Result\+Type} & the type to which copy\+\_\+from is being enabled \\
\hline
\end{DoxyTemplParams}


The documentation for this class was generated from the following file:\+\begin{DoxyCompactItemize}
\item 
ginkgo/\+core/\+base/\+polymorphic\+\_\+object.\+hpp\end{DoxyCompactItemize}
