Skip to content

Core guideline: Use constexpr for values that can be computed at compile time #237

@trueqbit

Description

@trueqbit

Commit 4e1b7cd introduced constexpr functions.

A code analysis with Visual C++ 2022 and the Microsoft Recommended Native Recommended Rules spits out the warning "con.5" from the category "Constants and immutability" in str_from_delimited_time_duration() and counted_time_rep<>::frac_sec_per_day():

warning C26498: The function 'function' is constexpr, mark variable 'variable' constexpr if compile-time evaluation is desired (con.5).

Correcting this warning has no effect on the constexpressivity, but it would be nice if these warnings disappeared.

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