Skip to content

Commit

Permalink
Fix protect problems on gcc 4.6 and 4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Sep 5, 2016
1 parent 4506f1d commit 2076a44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/fit/apply.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ struct apply_f

#endif
template<class F, class... Ts>
constexpr FIT_SFINAE_RESULT(F, id_<Ts>...)
operator()(F&& f, Ts&&... xs) const FIT_SFINAE_RETURNS
constexpr FIT_SFINAE_MANUAL_RESULT(F, id_<Ts>...)
operator()(F&& f, Ts&&... xs) const FIT_SFINAE_MANUAL_RETURNS
(
f(FIT_FORWARD(Ts)(xs)...)
);
Expand Down
6 changes: 6 additions & 0 deletions test/apply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ FIT_TEST_CASE()
FIT_TEST_CHECK(fit::apply(binary_class(), 1, 2) == 3);
}

FIT_TEST_CASE()
{
FIT_TEST_CHECK(fit::apply(fit::apply, binary_class(), 1, 2) == 3);
FIT_STATIC_TEST_CHECK(fit::apply(fit::apply, binary_class(), 1, 2) == 3);
}

struct member_sum_f
{
int i;
Expand Down

0 comments on commit 2076a44

Please sign in to comment.