Date: Sat, 8 Mar 2025 02:23:13 +0100
> Would the proposal here be to make constexpr std::chrono give the invocation time or some fixed now time for the whole compilation?
That is really a very central question:
There are good reasons for either and the feature would have a totally different role in the language.
PS:
Your example has compilation complexity O(1) :-)
-----Ursprüngliche Nachricht-----
Von:Jeremy Rifkin via Std-Proposals <std-proposals_at_[hidden]>
Gesendet:Sa 08.03.2025 01:59
Betreff:Re: [std-proposals] constexpr support for std::chrono::system_clock
An:std-proposals_at_[hidden];
CC:Jeremy Rifkin <rifkin.jer_at_[hidden]>;
Would the proposal here be to make constexpr std::chrono give the invocation time or some fixed now time for the whole compilation?
I'm just imagining:
consteval void who_needs_fast_compilation_anyway() {
auto start = std::chrono::system_clock::now();
while(std::chrono::system_clock::now() < start + std::chrono::minutes(1)) {}
}
Cheers,
Jeremy
Received on 2025-03-08 01:28:08