Skip to content

Unifying Signature Checks Across Value/Reference/Const Forms #68

@neeraj31285

Description

@neeraj31285

The current hasSignature() check is too strict when verifying if a method supports a given signature.

Example:

setAnimalName->hasSignature< std::string& >() → true

setAnimalName->hasSignature< std::string >() → false

This result is misleading. From a caller’s perspective, setAnimalName can clearly be invoked with either form — RTL will perfect-forward the argument correctly to the function.

The purpose of hasSignature< T >() is to allow users to safely verify that a method can be called with a given type. For that, it should abstract away the following equivalent forms:

T&

const T&

const T

T&&

In practice, if the call-site can compile in C++ with such an argument, hasSignature< T >() should return true.

Expected Behavior:
hasSignature< std::string >() should return true for a method declared as void setAnimalName(std::string&).

Rationale:
RTL’s responsibility is to ensure that user-provided arguments reach the final call-site as intended. Signature checks should reflect callability, not exact type qualifiers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions