Skip to content

Commit ba626b2

Browse files
committed
--verify template type
1 parent 8788f89 commit ba626b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/esp/sensor/sensorManagers/SensorWrapperBaseManager.h

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ class SensorWrapperBaseManager
3535
T,
3636
core::managedContainers::ManagedObjectAccess::Copy> {
3737
public:
38+
static_assert(std::is_base_of<esp::sensor::ManagedSensorBase, T>::value,
39+
"AbstractManagedSensor :: Managed sensor object type must be "
40+
"derived from esp::sensor::Sensor");
41+
3842
typedef std::shared_ptr<T> ObjWrapperPtr;
3943
explicit SensorWrapperBaseManager(const std::string& SensorType)
4044
: core::managedContainers::ManagedContainer<

0 commit comments

Comments
 (0)