forked from mpusz/mp-units
fix: got rid of terse syntax to make it work under MSVC
This commit is contained in:
@ -88,7 +88,8 @@ std::ostream& operator<<(std::ostream& os, const ratio& r)
|
|||||||
return os << "ratio{" << r.num << ", " << r.den << ", " << r.exp << "}";
|
return os << "ratio{" << r.num << ", " << r.den << ", " << r.exp << "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& os, const Unit auto& u)
|
template<Unit U>
|
||||||
|
std::ostream& operator<<(std::ostream& os, const U& u)
|
||||||
{
|
{
|
||||||
using unit_type = std::remove_cvref_t<decltype(u)>;
|
using unit_type = std::remove_cvref_t<decltype(u)>;
|
||||||
return os << unit_type::ratio << " x " << unit_type::reference::symbol.standard();
|
return os << unit_type::ratio << " x " << unit_type::reference::symbol.standard();
|
||||||
|
Reference in New Issue
Block a user