Unit Conversion and Dimensional Analysis Library  2.3.0
A compile-time c++14 unit conversion library
units::traits::is_convertible_unit< U1, U2 > Struct Template Reference

Trait which checks whether two units can be converted to each other. More...

#include <units.h>

Inheritance diagram for units::traits::is_convertible_unit< U1, U2 >:

Detailed Description

template<class U1, class U2>
struct units::traits::is_convertible_unit< U1, U2 >

Trait which checks whether two units can be converted to each other.

Inherits from std::true_type or std::false_type. Use is_convertible_unit<U1, U2>::value to test whether class U1 is convertible to class U2. Note: convertible has both the semantic meaning, (i.e. meters can be converted to feet), and the c++ meaning of conversion (type meters can be converted to type feet). Conversion is always symmetric, so if U1 is convertible to U2, then U2 will be convertible to U1.

Template Parameters
U1Unit to convert from.
U2Unit to convert to.
See also
is_convertible_unit_t

The documentation for this struct was generated from the following file: