//difficulty level: medium
#include <iostream>
struct Nec {
Nec() { std::cout << 'D'; }
Nec(const Nec&) { std::cout << 'C'; }
Nec& operator=(const Nec&) {
std::cout << 'A';
return *this;
}
};
int main()
{
Nec x;
auto f1 = [x = x]()mutable {
static Nec snec;
x = snec;
};
auto f2 = f1;
}