[#mrdocs-CompareDerived-0f]
= xref:mrdocs.adoc[mrdocs]::CompareDerived
:relfileprefix: ../
:mrdocs:

Compares two polymorphic objects that have visit functions

== Synopses

Declared in `&lt;mrdocs&sol;ADT&sol;Polymorphic&period;hpp&gt;`

Compares two polymorphic objects that have visit functions


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class Base&gt;
requires (!detail&colon;&colon;IsPolymorphic&lt;Base&gt;) &amp;&amp; detail&colon;&colon;CanVisitCompare&lt;Base&gt;
auto
xref:mrdocs/CompareDerived-0d.adoc[CompareDerived](
    Base const& lhs,
    Base const& rhs);
----

[.small]#xref:mrdocs/CompareDerived-0d.adoc[_» more&period;&period;&period;_]#

Compares two polymorphic objects that have visit functions


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class Base&gt;
requires detail&colon;&colon;CanVisitCompare&lt;Base&gt;
auto
xref:mrdocs/CompareDerived-08.adoc[CompareDerived](
    xref:mrdocs/Polymorphic.adoc[Polymorphic&lt;Base&gt;] const& lhs,
    xref:mrdocs/Polymorphic.adoc[Polymorphic&lt;Base&gt;] const& rhs);
----

[.small]#xref:mrdocs/CompareDerived-08.adoc[_» more&period;&period;&period;_]#

== Return Value

true if the two Polymorphic objects are equal, otherwise false&period;

== Template Parameters

[cols="1,4"]
|===
| Name| Description
| *Base*
| The type of the Polymorphic&period;
|===

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| The first Polymorphic to compare&period;
| *rhs*
| The second Polymorphic to compare&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
