diff --git a/examples/unit-test.cc b/examples/unit-test.cc index 9b0d63a..73e4add 100644 --- a/examples/unit-test.cc +++ b/examples/unit-test.cc @@ -689,6 +689,14 @@ void test_a() // auto expr4 = Expression{[i=10](int k) { return i * k ; }}; // auto expr5 = Expression(); } + { + vector e {1,2,3}; + auto expr = Expression{[](int i){ return i+1; }, ref(e)}; + auto exprexpr = 1.5 * expr + expr; + cout << "e=" << e << ", exprexpr="<(_args).size(); } + bool empty() const noexcept + { + return size() == 0; + } + // Returns true if argument pack Args... has at least one argument which itself is an expression. static constexpr bool hasExpressionArguments() {