[#mp_units-quantity-01-2constructor-09] = xref:mp_units.adoc[mp_units]::xref:mp_units/quantity-01.adoc[quantity]::quantity :relfileprefix: ../../ :mrdocs: Construct from `Value` == Synopsis Declared in `<mp‐units/framework/quantity.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename Value> requires detail::ExplicitFromNumber<reference> && detail::RepConstructibleFrom<rep, Value> && (!std::convertible_to<Value, rep>) [[nodiscard]] constexpr explicit quantity(Value val); ---- == Return Value [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *val* | The object to construct from |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#