Skip to content

Commit 645d24a

Browse files
author
Eduardo Madrid
committed
Makes refactored functions inline
1 parent ba42520 commit 645d24a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

test/AnyCallable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ struct CallableTests {
77
template<typename Signature>
88
using ZFunction = zoo::function<Signature>;
99

10-
static void execute();
10+
inline static void execute();
1111
};
1212

1313
template<typename ErasureProvider>

test/CallableHelper.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@ using LargeTypeEraser = zoo::AnyContainer<LargePolicy>;
66

77
/// Uses Argument Dependent Lookup
88
struct BeforeAnyCallableEraserADL: LargeTypeEraser {};
9-
void swap(BeforeAnyCallableEraserADL &e1, BeforeAnyCallableEraserADL &e2) noexcept {
9+
inline void swap(BeforeAnyCallableEraserADL &e1, BeforeAnyCallableEraserADL &e2) noexcept {
1010
auto &upcasted = static_cast<LargeTypeEraser &>(e1);
1111
swap(upcasted, e2);
1212
}
1313

1414
/// Uses the template with the policy as argument, works
1515
struct BeforeAnyCallableEraserP: LargeTypeEraser {};
16-
void swap(BeforeAnyCallableEraserP &e1, BeforeAnyCallableEraserP &e2) noexcept {
16+
inline void swap(BeforeAnyCallableEraserP &e1, BeforeAnyCallableEraserP &e2) noexcept {
1717
zoo::swap<LargePolicy>(e1, e2);
1818
}
1919

2020
/// Uses the template on the eraser as argument, won't use optimized overload
2121
struct BeforeAnyCallableEraserT: LargeTypeEraser {};
22-
void swap(BeforeAnyCallableEraserT &e1, BeforeAnyCallableEraserT &e2) noexcept {
22+
inline void swap(BeforeAnyCallableEraserT &e1, BeforeAnyCallableEraserT &e2) noexcept {
2323
zoo::swap<LargeTypeEraser>(e1, e2);
2424
}
2525

2626
struct AfterAnyCallableEraser: LargeTypeEraser {};
2727

2828
#include <zoo/function.h>
2929

30-
void swap(AfterAnyCallableEraser &e1, AfterAnyCallableEraser &e2) noexcept {
30+
inline void swap(AfterAnyCallableEraser &e1, AfterAnyCallableEraser &e2) noexcept {
3131
zoo::swap<LargePolicy>(e1, e2);
3232
}
3333

0 commit comments

Comments
 (0)