[#mp_units-is_value_preserving] = xref:mp_units.adoc[mp_units]::is_value_preserving :relfileprefix: ../ :mrdocs: Specifies if a specific conversion between two types preserves the value == Synopsis Declared in `<mp‐units/framework/customization_points.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename From, typename To> constexpr bool is_value_preserving = treat_as_floating_point<To> || !treat_as_floating_point<From>; ---- == Description This type trait should be specialized for a custom representation types to specify weather the conversion from the source type to the destination type preserves the value or not. Value‐truncating conversions should be forced by the user with explicit casts. == Template Parameters [cols=2] |=== | Name | Description | *From* | a source representation type | *To* | a destination representation type |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#