Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 branch information
1 parent
daf82a5
commit eaadc45
Showing
2 changed files
with
34 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters