mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:47:35 +00:00
Everywhere: Remove 'clang-format off' comments that are no longer needed
This commit is contained in:
parent
c911781c21
commit
996c020b0d
6 changed files with 42 additions and 57 deletions
|
@ -57,13 +57,9 @@ concept AnyString = IsConstructible<StringView, RemoveCVReference<T> const&>;
|
|||
template<typename T, typename U>
|
||||
concept HashCompatible = IsHashCompatible<Detail::Decay<T>, Detail::Decay<U>>;
|
||||
|
||||
// FIXME: remove once Clang formats these properly.
|
||||
// clang-format off
|
||||
|
||||
// Any indexable, sized, contiguous data structure.
|
||||
template<typename ArrayT, typename ContainedT, typename SizeT = size_t>
|
||||
concept ArrayLike = requires(ArrayT array, SizeT index)
|
||||
{
|
||||
concept ArrayLike = requires(ArrayT array, SizeT index) {
|
||||
{
|
||||
array[index]
|
||||
}
|
||||
|
@ -87,8 +83,7 @@ concept ArrayLike = requires(ArrayT array, SizeT index)
|
|||
|
||||
// Any indexable data structure.
|
||||
template<typename ArrayT, typename ContainedT, typename SizeT = size_t>
|
||||
concept Indexable = requires(ArrayT array, SizeT index)
|
||||
{
|
||||
concept Indexable = requires(ArrayT array, SizeT index) {
|
||||
{
|
||||
array[index]
|
||||
}
|
||||
|
@ -96,8 +91,7 @@ concept Indexable = requires(ArrayT array, SizeT index)
|
|||
};
|
||||
|
||||
template<typename Func, typename... Args>
|
||||
concept VoidFunction = requires(Func func, Args... args)
|
||||
{
|
||||
concept VoidFunction = requires(Func func, Args... args) {
|
||||
{
|
||||
func(args...)
|
||||
}
|
||||
|
@ -105,8 +99,7 @@ concept VoidFunction = requires(Func func, Args... args)
|
|||
};
|
||||
|
||||
template<typename Func, typename... Args>
|
||||
concept IteratorFunction = requires(Func func, Args... args)
|
||||
{
|
||||
concept IteratorFunction = requires(Func func, Args... args) {
|
||||
{
|
||||
func(args...)
|
||||
}
|
||||
|
@ -114,17 +107,19 @@ concept IteratorFunction = requires(Func func, Args... args)
|
|||
};
|
||||
|
||||
template<typename T, typename EndT>
|
||||
concept IteratorPairWith = requires(T it, EndT end)
|
||||
{
|
||||
concept IteratorPairWith = requires(T it, EndT end) {
|
||||
*it;
|
||||
{ it != end } -> SameAs<bool>;
|
||||
{
|
||||
it != end
|
||||
} -> SameAs<bool>;
|
||||
++it;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
concept IterableContainer = requires
|
||||
{
|
||||
{ declval<T>().begin() } -> IteratorPairWith<decltype(declval<T>().end())>;
|
||||
concept IterableContainer = requires {
|
||||
{
|
||||
declval<T>().begin()
|
||||
} -> IteratorPairWith<decltype(declval<T>().end())>;
|
||||
};
|
||||
|
||||
template<typename Func, typename... Args>
|
||||
|
@ -134,7 +129,6 @@ concept FallibleFunction = requires(Func&& func, Args&&... args) {
|
|||
func(forward<Args>(args)...).release_value();
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
#if !USING_AK_GLOBALLY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue