Skip to content

[C++] constexpr qualifier in static const field getters #353

@vdidenko

Description

@vdidenko

This is a follow up enhancement to the #195 issue.

I am tailoring the incoming message reaction, and it would be great to use a switch statement in the vein of the structurechart's comment. Similarly to @structurechart I ran into the constexpr requirement.

Would it be possible to discuss a solution similar to the sample commit vdidenko/simple-binary-encoding@fe16a8ce1f1e14916d3ebe363978549a26267d5c? It introduces public constexpr fields and uses them to maintain the getter function signatures.

I have only changed the fields I think I care about, but should I make the pull request similarly modifying all static const declarations touched by the original solution at a601c48?

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