C++ Logo

std-proposals

Advanced search

Re: [std-proposals] constexpr support for std::chrono::system_clock

From: Jan Schultke <janschultke_at_[hidden]>
Date: Fri, 7 Mar 2025 07:19:12 +0100
I've got a much simpler alternative idea: we could say that every clock has a

> static constinit const time_point translation_time;

... data member. There is no potential for ODR violations because you
cannot access it during constant evaluation anyway. It's simply saying
that you're baking the timestamp into the executable. The linker could
still optimize it out if it's unused.

Received on 2025-03-07 06:19:25