mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +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
1 changed files with 2 additions and 5 deletions
|
@ -15,6 +15,8 @@
|
||||||
struct timeval;
|
struct timeval;
|
||||||
struct timespec;
|
struct timespec;
|
||||||
|
|
||||||
|
namespace AK {
|
||||||
|
|
||||||
// Concept to detect types which look like timespec without requiring the type.
|
// Concept to detect types which look like timespec without requiring the type.
|
||||||
template<typename T>
|
template<typename T>
|
||||||
concept TimeSpecType = requires(T t)
|
concept TimeSpecType = requires(T t)
|
||||||
|
@ -23,10 +25,6 @@ concept TimeSpecType = requires(T t)
|
||||||
t.tv_nsec;
|
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.
|
// 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.
|
// 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
|
// 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_week;
|
||||||
using AK::day_of_year;
|
using AK::day_of_year;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue