https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85821

--- Comment #5 from Andrey Bolshakov <bolsh.andrey at yandex dot ru> ---
In principle, since C++20, you could use consteval to make the implementation
better corresponding to the current contradictory requirements of the standard:

consteval chrono::seconds operator""_s(unsigned long long x) {
    if (x > numeric_limits<chrono::seconds::rep>::max())
        throw "literal value cannot be represented by duration type";
    return chrono::seconds{x};
}

Reply via email to