Hello,
I'm working on a project where RTTI is not available and hit a stopper in ImNodeFlow in that regard.
In environments where RTTI is disabled (e.g. -fno-rtti / /GR-), typeid() is unavailable, making ConnectionFilter and getDataType() unusable.
This patch replaces the typeid-based type comparison with template-based equivalents using <type_traits>, which work without RTTI:
SameType() now uses std::is_same_v on the deduced types of connected pins
Numbers() now uses std::is_arithmetic_v on the output pin's value type
None() simplified to generic lambdas — no type info needed
getDataType() overrides commented out as the filters above no longer depend on them and they have no no-RTTI equivalent;
No behavioral change in RTTI-enabled builds for the None and Numbers filters.
SameType now performs a stricter compile-time check rather than a runtime type_info comparison.
Regards,
Lorenzo
PS: I've simply commented out getDataType() so far, let me know if you want it removed.
Hello,
I'm working on a project where RTTI is not available and hit a stopper in ImNodeFlow in that regard.
In environments where RTTI is disabled (e.g. -fno-rtti / /GR-), typeid() is unavailable, making ConnectionFilter and getDataType() unusable.
This patch replaces the typeid-based type comparison with template-based equivalents using <type_traits>, which work without RTTI:
SameType() now uses std::is_same_v on the deduced types of connected pins
Numbers() now uses std::is_arithmetic_v on the output pin's value type
None() simplified to generic lambdas — no type info needed
getDataType() overrides commented out as the filters above no longer depend on them and they have no no-RTTI equivalent;
No behavioral change in RTTI-enabled builds for the None and Numbers filters.
SameType now performs a stricter compile-time check rather than a runtime type_info comparison.
Regards,
Lorenzo
PS: I've simply commented out getDataType() so far, let me know if you want it removed.