refactor: UDLs support switched off by default

This commit is contained in:
Mateusz Pusz
2021-04-02 18:56:28 +02:00
parent 5fc7e01d19
commit 1a5b4fc85e
17 changed files with 144 additions and 142 deletions
+6 -6
View File
@@ -38,15 +38,15 @@ constexpr units::isq::Speed auto avg_speed(D d, T t)
void example()
{
using namespace units::isq;
using namespace units::isq::si::literals;
using namespace units::isq::si::references;
Length auto d1 = 123_q_m;
Time auto t1 = 10_q_s;
Length auto d1 = 123 * m;
Time auto t1 = 10 * s;
Speed auto v1 = avg_speed(d1, t1);
auto temp1 = v1 * 50_q_m; // produces intermediate unknown dimension with 'unknown_coherent_unit' as its 'coherent_unit'
Speed auto v2 = temp1 / 100_q_m; // back to known dimensions again
Length auto d2 = v2 * 60_q_s;
auto temp1 = v1 * (50 * m); // produces intermediate unknown dimension with 'unknown_coherent_unit' as its 'coherent_unit'
Speed auto v2 = temp1 / (100 * m); // back to known dimensions again
Length auto d2 = v2 * (60 * s);
std::cout << "d1 = " << d1 << '\n';
std::cout << "t1 = " << t1 << '\n';