Files
Cpp-in-Embedded-Systems/Chapter13/lfs_raii/util/src/units.cpp
Amar Mahmutbegovic 60b08160ba add Chapter13
2024-11-03 14:41:27 +01:00

12 lines
232 B
C++

#include <units.hpp>
namespace units {
voltage operator""_V(long double volts) {
return voltage(static_cast<float>(volts));
}
resistance operator""_Ohm(long double ohms) {
return resistance(static_cast<float>(ohms));
}
};