1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 02:17:34 +00:00

Everywhere: Run clang-format

The following command was used to clang-format these files:

    clang-format-16 -i $(find . \
        -not \( -path "./\.*" -prune \) \
        -not \( -path "./Base/*" -prune \) \
        -not \( -path "./Build/*" -prune \) \
        -not \( -path "./Toolchain/*" -prune \) \
        -not \( -path "./Ports/*" -prune \) \
        -type f -name "*.cpp" -o -name "*.h")
This commit is contained in:
Timothy Flynn 2023-07-07 22:44:33 -04:00 committed by Linus Groh
parent 388d455575
commit aff81d318b
17 changed files with 49 additions and 54 deletions

View file

@ -40,14 +40,15 @@ namespace Detail {
template<typename T, typename Out, typename... Args>
inline constexpr bool IsCallableWithArguments = requires(T t) {
{
t(declval<Args>()...)
} -> ConvertibleTo<Out>;
} || requires(T t) {
{
t(declval<Args>()...)
} -> SameAs<Out>;
};
{
t(declval<Args>()...)
} -> ConvertibleTo<Out>;
} || requires(T t) {
{
t(declval<Args>()...)
} -> SameAs<Out>;
};
}
using Detail::IsCallableWithArguments;

View file

@ -32,9 +32,9 @@ namespace AK {
// Concept to detect types which look like timespec without requiring the type.
template<typename T>
concept TimeSpecType = requires(T t) {
t.tv_sec;
t.tv_nsec;
};
t.tv_sec;
t.tv_nsec;
};
constexpr bool is_leap_year(int year)
{

View file

@ -220,8 +220,7 @@ struct Empty {
};
template<typename T>
concept NotLvalueReference = !
IsLvalueReference<T>;
concept NotLvalueReference = !IsLvalueReference<T>;
template<NotLvalueReference... Ts>
struct Variant

View file

@ -31,13 +31,13 @@ struct CanBePlacedInsideVectorHelper;
template<typename StorageType>
struct CanBePlacedInsideVectorHelper<StorageType, true> {
template<typename U>
static constexpr bool value = requires(U && u) { StorageType { &u }; };
static constexpr bool value = requires(U&& u) { StorageType { &u }; };
};
template<typename StorageType>
struct CanBePlacedInsideVectorHelper<StorageType, false> {
template<typename U>
static constexpr bool value = requires(U && u) { StorageType(forward<U>(u)); };
static constexpr bool value = requires(U&& u) { StorageType(forward<U>(u)); };
};
}