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 |
||
|---|---|---|
| .. | ||
| convert_exact.pass.cpp | ||
| convert_float_to_int.compile.fail.cpp | ||
| convert_inexact.compile.fail.cpp | ||
| convert_inexact.pass.cpp | ||
| convert_int_to_float.pass.cpp | ||
| convert_overflow.pass.cpp | ||
| default.pass.cpp | ||
| rep.pass.cpp | ||
| rep01.compile.fail.cpp | ||
| rep02.compile.fail.cpp | ||
| rep02.pass.cpp | ||
| rep03.compile.fail.cpp | ||