|
Unit Conversion and Dimensional Analysis Library 3.6.1
A compile-time, header-only C++23 dimensional-analysis library
|
SFINAE-able trait that maps a conversion_factor to its strengthened type. More...
#include <core.h>
Public Types | |
| using | type = decltype(strong_name(static_cast<T*>(nullptr))) |
SFINAE-able trait that maps a conversion_factor to its strengthened type.
If T is a cv-unqualified conversion_factor, the member type alias names the strong type alias of T, if any, and T otherwise. Otherwise, there is no type member.
The strong type of a conversion_factor is registered by its dimension header (e.g. units/frequency.h registers hertz for 1/time). Resolution is an ADL customization point (units::detail::strong_name), NOT an explicit specialization of strong: a named type is discovered by overload resolution over the conversion_factor's associated namespace at the point strong_t<T> is instantiated. This deliberately avoids the "explicit specialization after implicit instantiation" ordering trap (#357) — forming an expression that reduces to a not-yet-included dimension no longer bakes in a decision a later header would contradict; the later header simply contributes a better overload.