#include #include using namespace alsk::edsl; struct A { void operator()() {} }; struct B { int operator()(float) { return {}; } }; void f() {} TEST_CASE("edsl::Operand") { SECTION("from function-object") { { auto x = makeOperand(); using X = decltype(x); REQUIRE(std::is_same{}); REQUIRE(std::is_same{}); } { auto x = makeOperand), B>(); using X = decltype(x); REQUIRE(std::is_same{}); REQUIRE(std::is_same)>{}); } } SECTION("from function") { { auto x = alskMakeOperand(f); using X = decltype(x); REQUIRE(std::is_same>{}); REQUIRE(std::is_same{}); } { using Signature = int const&(&)(int const&, int const&); auto x = makeOperand>(); using X = decltype(x); REQUIRE(std::is_same>>{}); REQUIRE(std::is_same{}); } } }