2
0
mirror of https://github.com/boostorg/hof.git synced 2026-01-20 16:42:14 +00:00
Files
hof/test/repeat.cpp
2016-01-17 23:16:02 -06:00

19 lines
368 B
C++

#include <fit/repeat.hpp>
#include "test.hpp"
struct increment
{
template<class T>
constexpr T operator()(T x) const
{
return x + 1;
}
};
FIT_TEST_CASE()
{
FIT_TEST_CHECK(fit::repeat(std::integral_constant<int, 5>())(increment())(1) == 6);
FIT_STATIC_TEST_CHECK(fit::repeat(std::integral_constant<int, 5>())(increment())(1) == 6);
}