diff --git a/Machines/Utility/TypedDynamicMachine.hpp b/Machines/Utility/TypedDynamicMachine.hpp index d1e9d0530..5e60226cc 100644 --- a/Machines/Utility/TypedDynamicMachine.hpp +++ b/Machines/Utility/TypedDynamicMachine.hpp @@ -49,6 +49,18 @@ template class TypedDynamicMachine: public ::Machine::DynamicMachine private: template Class *get() { return dynamic_cast(machine_.get()); + + // Note to self: the below is not [currently] used + // because in practice TypedDynamicMachine is instantiated + // with an abstract parent of the actual class. + // + // TODO: rethink type hiding here. I think I've boxed myself + // into an uncomfortable corner. +// if constexpr (std::is_base_of_v) { +// return static_cast(machine_.get()); +// } else { +// return nullptr; +// } } std::unique_ptr machine_; };