[libc++][chrono] Adds operator<=> for day.Since the calendar classes were introduced in C++20 there's no need tokeep the old comparison operators.This commit does the day calender class, the oth
[libc++][chrono] Adds operator<=> for day.Since the calendar classes were introduced in C++20 there's no need tokeep the old comparison operators.This commit does the day calender class, the other calendar classes willbe in a followup commit.Implements parts of:- P1614R2 The mothership has landedReviewed By: #libc, ldionneDifferential Revision: https://reviews.llvm.org/D128603
show more ...
[libc++][chrono] Avoid tautological comparisions.In our implementation the year is always less than or equal to theclass' `max()`. It's unlikely this ever changes since changing theyear's range w
[libc++][chrono] Avoid tautological comparisions.In our implementation the year is always less than or equal to theclass' `max()`. It's unlikely this ever changes since changing theyear's range will be an ABI break. A static_assert is added as aguard.This was reported by @philnik.Reviewed By: ldionne, #libcDifferential Revision: https://reviews.llvm.org/D129442
[libc++] Make parameter names consistent and enforce the naming style using readability-identifier-namingEnsure that parameter names have the style `__lower_case`Reviewed By: ldionne, #libcSpie
[libc++] Make parameter names consistent and enforce the naming style using readability-identifier-namingEnsure that parameter names have the style `__lower_case`Reviewed By: ldionne, #libcSpies: aheejin, sstefan1, libcxx-commits, miyukiDifferential Revision: https://reviews.llvm.org/D129051
[NFC][libc++] Modularize chrono's calendar.The is a followup of D116965 to split the calendar header. This is apreparation to add the formatters for the chrono header.The code is only moved no o
[NFC][libc++] Modularize chrono's calendar.The is a followup of D116965 to split the calendar header. This is apreparation to add the formatters for the chrono header.The code is only moved no other changes have been made.Reviewed By: ldionne, #libc, philnikDifferential Revision: https://reviews.llvm.org/D122995
[libc++] Fixes calendar function visibility.Note of the functions was marked as _LIBCPP_HIDE_FROM_ABI.Did some minor formatting fixes to keep consistency. To keep it easy toreview not all odd fo
[libc++] Fixes calendar function visibility.Note of the functions was marked as _LIBCPP_HIDE_FROM_ABI.Did some minor formatting fixes to keep consistency. To keep it easy toreview not all odd formatting has been fixed.Reviewed By: ldionne, #libcDifferential Revision: https://reviews.llvm.org/D122834
[libc++] Revert "Protect users from relying on detail headers" & related changesThis commit reverts 5aaefa51 (and also partly 7f285f48e77 and b6d75682f9,which were related to the original commit).
[libc++] Revert "Protect users from relying on detail headers" & related changesThis commit reverts 5aaefa51 (and also partly 7f285f48e77 and b6d75682f9,which were related to the original commit). As landed, 5aaefa51 hadunintended consequences on some downstream bots and didn't have propercoverage upstream due to a few subtle things. Implementing this issomething we should do in libc++, however we'll first need to addressa few issues listed in https://reviews.llvm.org/D106124#3349710.Differential Revision: https://reviews.llvm.org/D120683
[libcxx][modules] protects users from relying on detail headerslibc++ has started splicing standard library headers into much morefine-grained content for maintainability. It's very likely that ou
[libcxx][modules] protects users from relying on detail headerslibc++ has started splicing standard library headers into much morefine-grained content for maintainability. It's very likely that outdatedand naive tooling (some of which is outside of LLVM's scope) willsuggest users include things such as <__ranges/access.h> instead of<ranges>, and Hyrum's law suggests that users will eventually begin torely on this without the help of tooling. As such, this commitintends to protect users from themselves, by making it a hard error foranyone outside of the standard library to include libc++ detail headers.Differential Revision: https://reviews.llvm.org/D106124
[libc++] Normalize all our '#pragma GCC system_header', and regression-test.Now we'll notice if a header forgets to include this magic phrase.Differential Revision: https://reviews.llvm.org/D1188
[libc++] Normalize all our '#pragma GCC system_header', and regression-test.Now we'll notice if a header forgets to include this magic phrase.Differential Revision: https://reviews.llvm.org/D118800
[libc++] Fix chrono::duration constructor constraintAs per [time.duration.cons]/1, the constructor constraint should be onconst Rep2&. As it is now the code will fail to compile in certaincases,
[libc++] Fix chrono::duration constructor constraintAs per [time.duration.cons]/1, the constructor constraint should be onconst Rep2&. As it is now the code will fail to compile in certaincases, 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
[libcxx] chrono::month_weekday should not be default constructibleIt was not in P0355R7, nor has it ever been so in a working draft.Drive-by:* tests should test something: fix loop bounds so ini
[libcxx] chrono::month_weekday should not be default constructibleIt was not in P0355R7, nor has it ever been so in a working draft.Drive-by:* tests should test something: fix loop bounds so initial value is not >= final value* calender type streaming tests are useless - let's remove them* don't declare printf, especially if you don't intend to use itDifferential Revision: https://reviews.llvm.org/D117638
[libc++] Split a few utilities out of __threading_supportThis change is the basis for a further refactoring where I'm going tosplit up the various implementations we have in __threading_support to
[libc++] Split a few utilities out of __threading_supportThis change is the basis for a further refactoring where I'm going tosplit up the various implementations we have in __threading_support tomake that code easier to understand.Note that I had to make __convert_to_timespec a template to breakcircular dependencies. Concretely, we never seem to use it with anythingother than ::timespec, but I am wary of hardcoding that assumption aspart of this change, since I suspect there's a reason for going throughthese hoops in the first place.Differential Revision: https://reviews.llvm.org/D116944
[libc++] Modularize <chrono>I didn't split the calendar bits more than this because there was littlebenefit to doing it, and I know our calendar support is incomplete.Whoever picks up the missing
[libc++] Modularize <chrono>I didn't split the calendar bits more than this because there was littlebenefit to doing it, and I know our calendar support is incomplete.Whoever picks up the missing calendar bits can organize these headersat their leisure.Differential Revision: https://reviews.llvm.org/D116965