> 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@lists.isocpp.org>
Gesendet: Sa 08.03.2025 01:59
Betreff: Re: [std-proposals] constexpr support for std::chrono::system_clock
An: std-proposals@lists.isocpp.org;
CC: Jeremy Rifkin <rifkin.jer@gmail.com>;
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