Skip to content

Commit 62bae82

Browse files
author
Conor
committed
inherit from policy
1 parent 6db764e commit 62bae82

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

benchmark/src/libfork_benchmark/fib/lf_parts.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import libfork.core;
99
namespace {
1010

1111
struct stack_on_heap {
12-
static auto operator new(std::size_t sz) -> void * { return ::operator new(sz); }
13-
static auto operator delete(void *p) noexcept -> void { ::operator delete(p); }
12+
static constexpr auto operator new(std::size_t sz) -> void * { return ::operator new(sz); }
13+
static constexpr auto operator delete(void *p) noexcept -> void { ::operator delete(p); }
1414
};
1515

1616
template <lf::alloc_mixin StackPolicy>

src/core/promise.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static_assert(std::is_empty_v<mixin_frame>);
136136
// =============== Promise (void) =============== //
137137

138138
template <alloc_mixin StackPolicy>
139-
struct promise_type<void, StackPolicy> : mixin_frame {
139+
struct promise_type<void, StackPolicy> : StackPolicy, mixin_frame {
140140

141141
frame_type frame;
142142

@@ -161,7 +161,7 @@ static_assert(std::is_standard_layout_v<promise_type<void, dummy_alloc>>);
161161
// =============== Promise (non-void) =============== //
162162

163163
template <typename T, alloc_mixin StackPolicy>
164-
struct promise_type : mixin_frame {
164+
struct promise_type : StackPolicy, mixin_frame {
165165
frame_type frame;
166166
T *return_address;
167167
};

0 commit comments

Comments
 (0)