[libc++] Fix chrono::duration constructor constraint
As per [time.duration.cons]/1, the constructor constraint should be on const Rep2&. As it is now the code will fail to compile in certain cases, for example (https://godbolt.org/z/c7fPrcTYM): struct S{ operator int() const&& noexcept = delete; operator int() const& noexcept; }; const S &fun(); auto k = std::chrono::microseconds{fun()}; Differential Revision: https://reviews.llvm.org/D118902
Loading
Please register or sign in to comment