Skip to content

Commit

Permalink
Fix warning on gcc 4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Jun 26, 2016
1 parent 70b0d5b commit 8d9b0e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/always.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ FIT_TEST_CASE()
FIT_TEST_CHECK( &fit::always_ref(i)(1,2,3,4,5) == &i );
}

FIT_STATIC_FUNCTION(ten) = fit::always(std::integral_constant<int, 10>{});
FIT_STATIC_FUNCTION(gten) = fit::always(std::integral_constant<int, 10>{});

FIT_TEST_CASE()
{
FIT_STATIC_TEST_CHECK(ten(1,2,3,4,5) == 10);
FIT_TEST_CHECK(ten(1,2,3,4,5) == 10);
FIT_STATIC_TEST_CHECK(gten(1,2,3,4,5) == 10);
FIT_TEST_CHECK(gten(1,2,3,4,5) == 10);
}

FIT_TEST_CASE()
{
auto f = fit::always(10);
STATIC_ASSERT_NOT_DEFAULT_CONSTRUCTIBLE(decltype(f));
FIT_TEST_CHECK(f(1,2,3,4,5) == 10);
}

0 comments on commit 8d9b0e8

Please sign in to comment.