Skip to content

Commit

Permalink
make_test_caller doesn't need to be a function template
Browse files Browse the repository at this point in the history
  • Loading branch information
jimporter committed Aug 15, 2024
1 parent 7fde185 commit 7825fae
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions include/mettle/suite/make_suite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,9 @@ namespace mettle {
Factory)
: base(name, attrs) {}
private:
template<typename T>
detail::test_caller<ParentFixture...> make_test_caller(T &&test) {
return {base::setup_, base::teardown_, std::forward<T>(test)};
detail::test_caller<ParentFixture...>
make_test_caller(typename base::function_type &&test) {
return {base::setup_, base::teardown_, std::move(test)};
}

template<typename Builder, typename Wrap>
Expand All @@ -336,10 +336,9 @@ namespace mettle {
Factory factory)
: base(name, attrs), factory_(factory) {}
private:
template<typename T>
detail::fixture_test_caller<Factory, Fixture, ParentFixture...>
make_test_caller(T &&test) {
return {{base::setup_, base::teardown_, std::forward<T>(test)}, factory_};
make_test_caller(typename base::function_type &&test) {
return {{base::setup_, base::teardown_, std::move(test)}, factory_};
}

template<typename Builder, typename Wrap>
Expand Down

0 comments on commit 7825fae

Please sign in to comment.