[#mp_units-interconvertible]
= xref:mp_units.adoc[mp&lowbar;units]::interconvertible
:relfileprefix: ../
:mrdocs:

Checks whether two quantity specifications are convertible to each other in both directions

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;quantity&lowbar;spec&lowbar;conversion&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    xref:mp_units/QuantitySpec.adoc[QuantitySpec] QS1,
    xref:mp_units/QuantitySpec.adoc[QuantitySpec] QS2&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
consteval
bool
interconvertible(
    QS1 qs1,
    QS2 qs2);
----

== Return Value

`true` if `qs1` is implicitly convertible to `qs2` and `qs2` is implicitly convertible to `qs1`

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Template Parameters

[cols="1,4"]
|===
| Name| Description
| *QS1*
| first quantity specification type
| *QS2*
| second quantity specification type
|===

== Parameters

[cols="1,4"]
|===
| Name| Description
| *qs1*
| first quantity specification value
| *qs2*
| second quantity specification value
|===


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