Unit Conversion and Dimensional Analysis Library 3.6.1
A compile-time, header-only C++23 dimensional-analysis library
Loading...
Searching...
No Matches
error_incompatible-add.gcc13

readable_add_incompatible.cpp:9:18: error: no match for ‘operator+’ (operand types are ‘units::length::meters<double>’ and ‘units::time::seconds<double>’)
9 | auto bad = 1.0_m + 1.0_s; // ill-formed: cannot add length and time
| ~~~~~ ^ ~~~~~
| | |
| | units::time::seconds<double>
| units::length::meters<double>
readable_add_incompatible.cpp:9:18: note: there are 9 candidates
9 | auto bad = 1.0_m + 1.0_s; // ill-formed: cannot add length and time