Phyth v0.1.0
A dimensional safe C++ header-only mechanics and electromagnetics simulation library.
Loading...
Searching...
No Matches
common_type_impl< U1, U2, typename > Struct Template Reference

std::common_type specialization for Quantity More...

Inheritance diagram for common_type_impl< U1, U2, typename >:
Inheritance graph
[legend]

Detailed Description

template<typename U1, typename U2, typename = void>
struct common_type_impl< U1, U2, typename >

std::common_type specialization for Quantity

Allows mixing Quantity types in templates that use common_type. Prefers the left operand's unit as the common type.

Template Parameters
U1Unit type of the first Quantity
U2Unit type of the second Quantity

Example: std::common_type_t<Quantity<Meter>, Quantity<Centimeter>> // -> Quantity<Meter>

Definition at line 783 of file Quantity.hpp.


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