Fixed handling of nested lambda expressions in sequence diagrams

This commit is contained in:
Bartek Kryza
2024-04-28 01:14:01 +02:00
parent 0539fb0101
commit efc34bcec6
13 changed files with 407 additions and 50 deletions
+24
View File
@@ -0,0 +1,24 @@
namespace clanguml {
namespace t20046 {
template <typename F> int a1(F &&f) { return f(42); }
int a2(int x) { return 2; }
int a3(int x) { return 3; }
int tmain()
{
// Call expression in a nested lambda
auto v1 = [](auto &&arg1) {
return [](auto &&arg2) { return a2(arg2); }(arg1);
}(0);
// Call expression in a nested lambda in call expression
auto v4 = a1(
[](auto &&arg1) { return [](auto &&arg2) { return a3(arg2); }(arg1); });
return 0;
}
}
}