[#mp_units-quantity_point-08-2constructor-075]
= xref:mp_units.adoc[mp&lowbar;units]::xref:mp_units/quantity_point-08.adoc[quantity&lowbar;point]::quantity&lowbar;point
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

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

Default constructor&period; Leaves the underlying quantity default&hyphen;initialized&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
xref:mp_units/quantity_point-08/2constructor-07e.adoc[quantity&lowbar;point]() = default;
----

[.small]#xref:mp_units/quantity_point-08/2constructor-07e.adoc[_» more&period;&period;&period;_]#

Converting constructor from a quantity point anchored to a different absolute point origin&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:mp_units/QuantityPoint.adoc[QuantityPoint] QP&gt;
requires (!QuantityPointOf&lt;QP, absolute&lowbar;point&lowbar;origin&gt;) &amp;&amp; requires(const QP&amp; src) &lcub;
      &lcub; src&period;point&lowbar;for(point&lowbar;origin) &rcub; &hyphen;&gt; QuantityPointOf&lt;point&lowbar;origin&gt;&semi;
      quantity&lowbar;type&lcub;src&period;point&lowbar;for(point&lowbar;origin) &hyphen; point&lowbar;origin&rcub;&semi;
    &rcub;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
explicit
xref:mp_units/quantity_point-08/2constructor-09.adoc[quantity&lowbar;point](QP const& qp);
----

[.small]#xref:mp_units/quantity_point-08/2constructor-09.adoc[_» more&period;&period;&period;_]#

Constructs a quantity point from an external quantity&hyphen;point&hyphen;like type via `quantity&lowbar;point&lowbar;like&lowbar;traits`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:mp_units/QuantityPointLike.adoc[QuantityPointLike] QP&gt;
requires (quantity&lowbar;point&lowbar;like&lowbar;traits&lt;QP&gt;&colon;&colon;point&lowbar;origin &equals;&equals; point&lowbar;origin) &amp;&amp;
            std&colon;&colon;constructible&lowbar;from&lt;quantity&lowbar;type, quantity&lt;quantity&lowbar;point&lowbar;like&lowbar;traits&lt;QP&gt;&colon;&colon;reference,
                                                            typename quantity&lowbar;point&lowbar;like&lowbar;traits&lt;QP&gt;&colon;&colon;rep&gt;&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
explicit(quantity&lowbar;point&lowbar;like&lowbar;traits&lt;QP&gt;&colon;&colon;explicit&lowbar;import &verbar;&verbar; !std&colon;&colon;convertible&lowbar;to&lt;quantity&lt;quantity&lowbar;point&lowbar;like&lowbar;traits&lt;QP&gt;&colon;&colon;reference, typename quantity&lowbar;point&lowbar;like&lowbar;traits&lt;QP&gt;&colon;&colon;rep&gt;, quantity&lowbar;type&gt;)
xref:mp_units/quantity_point-08/2constructor-07c.adoc[quantity&lowbar;point](QP const& qp);
----

[.small]#xref:mp_units/quantity_point-08/2constructor-07c.adoc[_» more&period;&period;&period;_]#

Converting constructor from another quantity point that shares this one&apos;s absolute point origin&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:mp_units/QuantityPointOf.adoc[QuantityPointOf&lt;absolute&lowbar;point&lowbar;origin&gt;] QP&gt;
requires std&colon;&colon;constructible&lowbar;from&lt;quantity&lowbar;type, typename QP&colon;&colon;quantity&lowbar;type&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
explicit(!std&colon;&colon;convertible&lowbar;to&lt;typename QP&colon;&colon;quantity&lowbar;type, quantity&lowbar;type&gt;)
xref:mp_units/quantity_point-08/2constructor-00.adoc[quantity&lowbar;point](QP const& qp);
----

[.small]#xref:mp_units/quantity_point-08/2constructor-00.adoc[_» more&period;&period;&period;_]#

Constructs a quantity point from a quantity, measured from the default point origin&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename FwdQ,
    xref:mp_units/QuantityOf.adoc[QuantityOf&lt;quantity&lowbar;spec&gt;] Q = std::remove&lowbar;cvref&lowbar;t&lt;FwdQ&gt;&gt;
requires std&colon;&colon;constructible&lowbar;from&lt;quantity&lowbar;type, FwdQ&gt; &amp;&amp; (point&lowbar;origin &equals;&equals; default&lowbar;point&lowbar;origin(R))
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
explicit
xref:mp_units/quantity_point-08/2constructor-0b.adoc[quantity&lowbar;point](FwdQ&& q);
----

[.small]#xref:mp_units/quantity_point-08/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Constructs a quantity point from a quantity measured from this point&apos;s own origin&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename FwdQ,
    xref:mp_units/QuantityOf.adoc[QuantityOf&lt;quantity&lowbar;spec&gt;] Q = std::remove&lowbar;cvref&lowbar;t&lt;FwdQ&gt;&gt;
requires std&colon;&colon;constructible&lowbar;from&lt;quantity&lowbar;type, FwdQ&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/quantity_point-08/2constructor-02.adoc[quantity&lowbar;point](
    FwdQ&& q,
    decltype(PO) po);
----

[.small]#xref:mp_units/quantity_point-08/2constructor-02.adoc[_» more&period;&period;&period;_]#

Constructs a quantity point from a quantity measured from another point origin that shares this one&apos;s absolute point origin&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename FwdQ,
    xref:mp_units/PointOrigin.adoc[PointOrigin] PO2,
    xref:mp_units/Quantity-0c.adoc[Quantity] Q = std::remove&lowbar;cvref&lowbar;t&lt;FwdQ&gt;&gt;
requires PointOriginFor&lt;PO2, Q&colon;&colon;quantity&lowbar;spec&gt; &amp;&amp; std&colon;&colon;constructible&lowbar;from&lt;quantity&lowbar;type, FwdQ&gt; &amp;&amp;
             detail&colon;&colon;SameAbsolutePointOriginAs&lt;PO2, PO&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/quantity_point-08/2constructor-08.adoc[quantity&lowbar;point](
    FwdQ&& q,
    PO2 po);
----

[.small]#xref:mp_units/quantity_point-08/2constructor-08.adoc[_» more&period;&period;&period;_]#

== Return Value

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

[cols="1,4"]
|===
| Name| Description
| *qp*
| the source quantity point to convert from
| *q*
| the quantity giving the offset from `point&lowbar;origin`
| *po*
| the point origin the quantity is measured from, equal to `point&lowbar;origin`
|===


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