C++ Logo


Advanced search

Subject: std::chrono: intend of op-/ for std:.chrono::day
From: Wilhelm Meier (wilhelm.meier_at_[hidden])
Date: 2020-01-16 08:50:09

Hi all,

just stumbled across the following:

    auto t1 = 12s / 3;
    auto t2 = 12d / 3;

t1 gives a duration of 3 seconds (reasonable, but t2 gives 12th of march.

Is this intentional?

I know, that 12s is a duration, and 12d is a timepoint. But for the
careless reader, this is counter-intuitive.

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups