Unit Conversion and Dimensional Analysis Library  2.3.0
A compile-time c++14 unit conversion library
Classes | Typedefs
units::traits Namespace Reference

namespace representing type traits which can access the properties of types provided by the units library. More...

Classes

struct  has_decibel_scale
 Trait which tests whether a type is inherited from a decibel scale. More...
 
struct  has_linear_scale
 Trait which tests whether a type is inherited from a linear scale. More...
 
struct  is_acceleration_unit
 
struct  is_angle_unit
 
struct  is_angular_velocity_unit
 
struct  is_area_unit
 
struct  is_base_unit
 Trait which tests if a class is a base_unit type. More...
 
struct  is_capacitance_unit
 
struct  is_charge_unit
 
struct  is_concentration_unit
 
struct  is_conductance_unit
 
struct  is_convertible_unit
 Trait which checks whether two units can be converted to each other. More...
 
struct  is_convertible_unit_t
 Trait which tests whether two container types derived from unit_t are convertible to each other. More...
 
struct  is_current_unit
 
struct  is_data_transfer_rate_unit
 
struct  is_data_unit
 
struct  is_density_unit
 
struct  is_dimensionless_unit
 
struct  is_energy_unit
 
struct  is_force_unit
 
struct  is_frequency_unit
 
struct  is_illuminance_unit
 
struct  is_impedance_unit
 
struct  is_inductance_unit
 
struct  is_length_unit
 
struct  is_luminous_flux_unit
 
struct  is_luminous_intensity_unit
 
struct  is_magnetic_field_strength_unit
 
struct  is_magnetic_flux_unit
 
struct  is_mass_unit
 
struct  is_nonlinear_scale
 Trait which tests that class T meets the requirements for a non-linear scale. More...
 
struct  is_power_unit
 
struct  is_pressure_unit
 
struct  is_radioactivity_unit
 
struct  is_ratio
 Trait that tests whether a type represents a std::ratio. More...
 
struct  is_same_scale
 Trait which tests whether two types has the same non-linear scale. More...
 
struct  is_scalar_unit
 
struct  is_solid_angle_unit
 
struct  is_substance_unit
 
struct  is_temperature_unit
 
struct  is_time_unit
 
struct  is_torque_unit
 
struct  is_unit
 Traits which tests if a class is a unit More...
 
struct  is_unit_t
 Traits which tests if a class is a unit More...
 
struct  is_unit_value_t
 Trait which tests whether a type is a unit_value_t representing the given unit type. More...
 
struct  is_unit_value_t_category
 Trait which tests whether type T is a unit_value_t with a unit type in the given category. More...
 
struct  is_velocity_unit
 
struct  is_voltage_unit
 
struct  is_volume_unit
 

Typedefs

template<class U >
using base_unit_of = typename units::detail::base_unit_of_impl< U >::type
 Trait which returns the base_unit type that a unit is originally derived from. More...
 

Detailed Description

namespace representing type traits which can access the properties of types provided by the units library.

Trait which tests whether a type represents a unit of data_transfer_rate.

Trait which tests whether a type represents a unit of data.

Trait which tests whether a type represents a unit of concentration.

Trait which tests whether a type represents a unit of density.

Trait which tests whether a type represents a unit of volume.

Trait which tests whether a type represents a unit of area.

Trait which tests whether a type represents a unit of torque.

Trait which tests whether a type represents a unit of radioactivity.

Trait which tests whether a type represents a unit of illuminance.

Trait which tests whether a type represents a unit of luminous_flux.

Trait which tests whether a type represents a unit of inductance.

Trait which tests whether a type represents a unit of magnetic_field_strength.

Trait which tests whether a type represents a unit of magnetic_flux.

Trait which tests whether a type represents a unit of conductance.

Trait which tests whether a type represents a unit of impedance.

Trait which tests whether a type represents a unit of capacitance.

Trait which tests whether a type represents a unit of voltage.

Trait which tests whether a type represents a unit of power.

Trait which tests whether a type represents a unit of energy.

Trait which tests whether a type represents a unit of charge.

Trait which tests whether a type represents a unit of pressure.

Trait which tests whether a type represents a unit of force.

Trait which tests whether a type represents a unit of acceleration.

Trait which tests whether a type represents a unit of angular_velocity.

Trait which tests whether a type represents a unit of velocity.

Trait which tests whether a type represents a unit of frequency.

Trait which tests whether a type represents a unit of solid_angle.

Trait which tests whether a type represents a unit of luminous_intensity.

Trait which tests whether a type represents a unit of substance.

Trait which tests whether a type represents a unit of temperature.

Trait which tests whether a type represents a unit of current.

Trait which tests whether a type represents a unit of angle.

Trait which tests whether a type represents a unit of time.

Trait which tests whether a type represents a unit of mass.

Trait which tests whether a type represents a unit of length.

Trait which tests whether a type represents a unit of dimensionless.

Trait which tests whether a type represents a unit of scalar.

Inherits from std::true_type or std::false_type. Use is_scalar_unit<T>::value to test the unit represents a scalar quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_dimensionless_unit<T>::value to test the unit represents a dimensionless quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_length_unit<T>::value to test the unit represents a length quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_mass_unit<T>::value to test the unit represents a mass quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_time_unit<T>::value to test the unit represents a time quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_angle_unit<T>::value to test the unit represents a angle quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_current_unit<T>::value to test the unit represents a current quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_temperature_unit<T>::value to test the unit represents a temperature quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_substance_unit<T>::value to test the unit represents a substance quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_luminous_intensity_unit<T>::value to test the unit represents a luminous_intensity quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_solid_angle_unit<T>::value to test the unit represents a solid_angle quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_frequency_unit<T>::value to test the unit represents a frequency quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_velocity_unit<T>::value to test the unit represents a velocity quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_angular_velocity_unit<T>::value to test the unit represents a angular_velocity quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_acceleration_unit<T>::value to test the unit represents a acceleration quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_force_unit<T>::value to test the unit represents a force quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_pressure_unit<T>::value to test the unit represents a pressure quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_charge_unit<T>::value to test the unit represents a charge quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_energy_unit<T>::value to test the unit represents a energy quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_power_unit<T>::value to test the unit represents a power quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_voltage_unit<T>::value to test the unit represents a voltage quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_capacitance_unit<T>::value to test the unit represents a capacitance quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_impedance_unit<T>::value to test the unit represents a impedance quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_conductance_unit<T>::value to test the unit represents a conductance quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_magnetic_flux_unit<T>::value to test the unit represents a magnetic_flux quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_magnetic_field_strength_unit<T>::value to test the unit represents a magnetic_field_strength quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_inductance_unit<T>::value to test the unit represents a inductance quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_luminous_flux_unit<T>::value to test the unit represents a luminous_flux quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_illuminance_unit<T>::value to test the unit represents a illuminance quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_radioactivity_unit<T>::value to test the unit represents a radioactivity quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_torque_unit<T>::value to test the unit represents a torque quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_area_unit<T>::value to test the unit represents a area quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_volume_unit<T>::value to test the unit represents a volume quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_density_unit<T>::value to test the unit represents a density quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_concentration_unit<T>::value to test the unit represents a concentration quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_data_unit<T>::value to test the unit represents a data quantity.

Template Parameters
Tone or more types to test

Inherits from std::true_type or std::false_type. Use is_data_transfer_rate_unit<T>::value to test the unit represents a data_transfer_rate quantity.

Template Parameters
Tone or more types to test

Typedef Documentation

◆ base_unit_of

template<class U >
using units::traits::base_unit_of = typedef typename units::detail::base_unit_of_impl<U>::type

Trait which returns the base_unit type that a unit is originally derived from.

Since units can be derived from other unit types in addition to base_unit types, the base_unit_type typedef will not always be a base_unit (or unit category). Since compatible