mirror of
https://github.com/boostorg/hof.git
synced 2026-01-24 05:52:15 +00:00
16 lines
299 B
C++
16 lines
299 B
C++
#include "test.h"
|
|
#include <fit/each_arg.h>
|
|
|
|
FIT_TEST_CASE()
|
|
{
|
|
std::string s;
|
|
auto f = [&](const std::string& x)
|
|
{
|
|
s += x;
|
|
};
|
|
fit::each_arg(f, "hello", "-", "world");
|
|
FIT_TEST_CHECK(s == "hello-world");
|
|
fit::each_arg(f);
|
|
FIT_TEST_CHECK(s == "hello-world");
|
|
}
|