[#mp_units-get_quantity_spec-068] = xref:mp_units.adoc[mp_units]::get_quantity_spec :relfileprefix: ../ :mrdocs: == Synopsis Declared in `<mp‐units/framework/unit_definitions.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<xref:mp_units/Unit.adoc[Unit] U> requires std::is_final_v<decltype(detail::get_associated_quantity(U{}))> [[deprecated("2.6.0: `quantity_spec` definition of `U` should not be marked `final`"), nodiscard]] consteval xref:mp_units/QuantitySpec.adoc[QuantitySpec] auto get_quantity_spec(U); ---- [WARNING] ==== https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]: 2.6.0: `quantity_spec` definition of `U` should not be marked `final`. Use of this entity is allowed but discouraged. ==== [NOTE] ==== This function is a https://en.cppreference.com/w/cpp/language/friend[hidden friend] of xref:mp_units/one-0f.adoc[one], declared inside an implementation-defined base class: it can be found only through argument-dependent lookup. ==== == Return Value [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== [.small]#Created with https://www.mrdocs.com[MrDocs]#