Skip to content

Commit 6608220

Browse files
authored
Enable clang formating for memoryallocator concept now setting compound requirements on a single line supported (#475)
1 parent 2c830eb commit 6608220

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

libraries/core/lib/morpheus/core/memory/concepts/allocator.hpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
namespace morpheus::memory::concepts
1111
{
1212

13-
// clang-format off
14-
// Requires clang-format 18.0 support for AllowShortCompoundRequirementOnASingleLine: true
15-
1613
/// \concept Allocator
1714
/// Concept capturing the requirements for an allocator as outline in the standard at
1815
/// <a href="https://eel.is/c++draft/allocator.requirements">[allocator.requirements]</a>.
@@ -38,11 +35,11 @@ concept Allocator = requires(A<T> a, typename std::allocator_traits<A<T>>::size_
3835
{ a.allocate(s) } -> std::same_as<typename std::allocator_traits<A<T>>::pointer>;
3936
{ a.deallocate(p, s) } -> std::same_as<void>;
4037

41-
#if (__cpp_lib_allocate_at_least >= 202302L )
42-
{ a.allocate_at_least(s) } -> std::same_as<std::allocation_result<typename std::allocator_traits<A<T>>::pointer, typename std::allocator_traits<A<T>>::size_type>>;
38+
#if (__cpp_lib_allocate_at_least >= 202302L)
39+
{
40+
a.allocate_at_least(s)
41+
} -> std::same_as<std::allocation_result<typename std::allocator_traits<A<T>>::pointer, typename std::allocator_traits<A<T>>::size_type>>;
4342
#endif
4443
};
4544

46-
// clang-format on
47-
4845
} // namespace morpheus::memory::concepts

libraries/core/lib/morpheus/core/memory/concepts/nullable_pointer.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
namespace morpheus::memory::concepts
88
{
99

10-
// clang-format off
11-
// Requires clang-format 18.0 support for AllowShortCompoundRequirementOnASingleLine: true
12-
1310
/// \concept NullablePointer
1411
/// Concept capturing the requirements for a nullable pointer, a named requirement outlined in the standard at
1512
/// <a href="https://eel.is/c++draft/nullablepointer.requirements">[nullablepointer.requirements]</a>, details at
@@ -27,6 +24,4 @@ concept NullablePointer = requires(T t) {
2724
{ t = nullptr } -> std::same_as<T&>;
2825
};
2926

30-
// clang-format off
31-
3227
} // namespace morpheus::memory::concepts

0 commit comments

Comments
 (0)