Skip to content

RTTI dependency in ConnectionFilter #72

Description

@lpastrana-phaseview

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions