date_time icon indicating copy to clipboard operation
date_time copied to clipboard

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

Open trueqbit opened this issue 2 years ago • 0 comments

Commit 4e1b7cde45ed 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.

trueqbit avatar Dec 10 '23 20:12 trueqbit