Variant varFunc; varFunc = [](int a, int b) { return a + b; };
Variant varFunc; varFunc = [](int a, int b) { return a + b; }; int sum = varFunc.callIn this example, a lambda function that takes two integer arguments and returns their sum is assigned to a Variant OleFunction object. The `call` method of the Variant object is then used to call the stored function with arguments 3 and 4, and the returned value (7) is stored in the `sum` variable. Package library: The C++ standard library or Boost library.(3, 4); // sum = 7