mirror of
https://github.com/boostorg/hof.git
synced 2026-01-20 16:42:14 +00:00
19 lines
368 B
C++
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);
|
|
}
|