2
0
mirror of https://github.com/boostorg/hof.git synced 2026-01-24 05:52:15 +00:00
Files
hof/test/invoke.cpp

18 lines
328 B
C++

#include <fit/invoke.h>
#include "test.h"
struct my_add
{
template<class T>
constexpr T operator()(T x, T y) const
{
return x + y;
}
};
FIT_TEST_CASE()
{
std::plus<int> add;
FIT_TEST_CHECK(fit::invoke(add,std::make_tuple(1,1)) == 2);
FIT_STATIC_TEST_CHECK(fit::invoke(my_add(), std::make_tuple(1,1)) == 2);
}