2
0
mirror of https://github.com/boostorg/hof.git synced 2026-02-01 08:32:12 +00:00
Files
hof/test/repeat.cpp
2016-03-02 01:46:17 -06:00

25 lines
580 B
C++

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