[libcxx-commits] [libcxx] 622c407 - [libc++] Make __weekday_from_days private in weekday
Joe Loser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 19 11:21:54 PDT 2021
Author: Joe Loser
Date: 2021-10-19T14:21:33-04:00
New Revision: 622c40722e140239d14a19d1c3b7013de2863fe1
URL: https://github.com/llvm/llvm-project/commit/622c40722e140239d14a19d1c3b7013de2863fe1
DIFF: https://github.com/llvm/llvm-project/commit/622c40722e140239d14a19d1c3b7013de2863fe1.diff
LOG: [libc++] Make __weekday_from_days private in weekday
`weekday` has a static member function `__weekday_from_days` which is
not part of the mandated public interface of `weeekday` according to the
standard. Since it is only used internally in the constructors of
`weekday`, let's make it private.
Reviewed By: ldionne, Mordante, #libc
Differential Revision: https://reviews.llvm.org/D112072
Added:
Modified:
libcxx/include/chrono
Removed:
################################################################################
diff --git a/libcxx/include/chrono b/libcxx/include/chrono
index 48a8665e53f51..5ba405e2f2b0e 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -1839,6 +1839,7 @@ class weekday_last;
class weekday {
private:
unsigned char __wd;
+ static constexpr unsigned char __weekday_from_days(int __days) noexcept;
public:
weekday() = default;
inline explicit constexpr weekday(unsigned __val) noexcept : __wd(static_cast<unsigned char>(__val == 7 ? 0 : __val)) {}
@@ -1858,9 +1859,6 @@ public:
inline constexpr bool ok() const noexcept { return __wd <= 6; }
constexpr weekday_indexed operator[](unsigned __index) const noexcept;
constexpr weekday_last operator[](last_spec) const noexcept;
-
- // TODO: Make private?
- static constexpr unsigned char __weekday_from_days(int __days) noexcept;
};
More information about the libcxx-commits
mailing list