Skip to content

Use if constexpr more generously #856

@lemire

Description

@lemire

There are many instances in our code base where we could use the C++17 construct if constexpr.

Starting with PR match_system is a constexpr function. Thus many checks against match_system can be made if constexpr. In release mode, this is unlikely to help performance since the compiler optimizer can already know that it is dealing with a compile-time constant. However, it may help with code clarity and maybe have other benefits.

cc @anonrig

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions