C++ Logo


Advanced search

Subject: Re: [std-proposals] C++20 chrono library can't use max date?
From: Thiago Macieira (thiago_at_[hidden])
Date: 2019-12-20 14:33:21

On Friday, 20 December 2019 09:22:15 PST Akira Takahashi via Std-Proposals
> `std::chrono::year` class has 16-bits signed integer for year
> value. [-32767, 32767]
> However, `system_clock::time_point::max()` of libc++ implementation
> has 294247 years (microseconds based). So, C++20 chrono library can't use
> max date.
> Is this defect or correct?

It's correct.

And libstdc++ is even shorter, with just 294.2 years (nanosecond based).

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups