Skip to content

Add default policy-name function #185

@koparasy

Description

@koparasy

In Action, Policy, basically every abstract layers with a method name(), we could have something like that by default:

    virtual const char* name() const {
        // +1 to remove the first character which is the number of letters in the name (C++ default)
        return typeid(*this).name()+1;
    }

Users could override it but at least all the tests etc would be simpler.

Originally posted by @lpottier in #183 (comment)

Metadata

Metadata

Assignees

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