mirror of
https://github.com/boostorg/hof.git
synced 2026-02-01 20:42:14 +00:00
16 lines
262 B
C++
16 lines
262 B
C++
#include <fit/function.h>
|
|
#include <fit/partial.h>
|
|
#include <memory>
|
|
#include "test.h"
|
|
|
|
FIT_STATIC_FUNCTION(sum) = fit::partial([](int x, int y)
|
|
{
|
|
return x + y;
|
|
});
|
|
|
|
FIT_TEST_CASE()
|
|
{
|
|
FIT_TEST_CHECK(3 == sum(1, 2));
|
|
FIT_TEST_CHECK(3 == sum(1)(2));
|
|
}
|