mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 20:21:04 +00:00
refactor (cxx)!: I2C C++ classes use strong value types now
Added host-based I2C C++ unit tests BREAKING CHANGE: I2C C++ interface changes, raw values for arguments are mostly not allowed anymore.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
template<typename ValueT>
|
||||
class StrongValue {
|
||||
protected:
|
||||
StrongValue(ValueT value_arg) : value(value_arg) { }
|
||||
constexpr StrongValue(ValueT value_arg) : value(value_arg) { }
|
||||
|
||||
ValueT get_value() const {
|
||||
return value;
|
||||
@@ -44,7 +44,7 @@ private:
|
||||
template<typename ValueT>
|
||||
class StrongValueComparable : public StrongValue<ValueT> {
|
||||
protected:
|
||||
StrongValueComparable(ValueT value_arg) : StrongValue<ValueT>(value_arg) { }
|
||||
constexpr StrongValueComparable(ValueT value_arg) : StrongValue<ValueT>(value_arg) { }
|
||||
|
||||
public:
|
||||
using StrongValue<ValueT>::get_value;
|
||||
|
Reference in New Issue
Block a user