mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: Move TimeSpecType concept inside the AK namespace
This is just to allow removing the 'clang-format off' directive. This concept is only used within this header, so it doesn't need to be in the global namespace.
This commit is contained in:
parent
8f5c1ef29c
commit
0c75a14b4f
Notes:
sideshowbarker
2024-07-17 21:34:58 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/0c75a14b4fe Pull-request: https://github.com/SerenityOS/serenity/pull/11644 Reviewed-by: https://github.com/Lubrsi Reviewed-by: https://github.com/linusg ✅
1 changed files with 2 additions and 5 deletions
|
@ -15,6 +15,8 @@
|
|||
struct timeval;
|
||||
struct timespec;
|
||||
|
||||
namespace AK {
|
||||
|
||||
// Concept to detect types which look like timespec without requiring the type.
|
||||
template<typename T>
|
||||
concept TimeSpecType = requires(T t)
|
||||
|
@ -23,10 +25,6 @@ concept TimeSpecType = requires(T t)
|
|||
t.tv_nsec;
|
||||
};
|
||||
|
||||
// FIXME: remove once Clang formats these properly.
|
||||
// clang-format off
|
||||
namespace AK {
|
||||
|
||||
// Month and day start at 1. Month must be >= 1 and <= 12.
|
||||
// The return value is 0-indexed, that is 0 is Sunday, 1 is Monday, etc.
|
||||
// Day may be negative or larger than the number of days
|
||||
|
@ -298,7 +296,6 @@ inline bool operator!=(const T& a, const T& b)
|
|||
}
|
||||
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
using AK::day_of_week;
|
||||
using AK::day_of_year;
|
||||
|
|
Loading…
Reference in a new issue