fork download
  1. #include <iostream>
  2.  
  3. namespace {
  4. int x = 3;
  5. struct { int operator()(int i) { return i + x; } } lambda;
  6. }
  7.  
  8. int main() {
  9. ::std::cout << lambda(2) << "\n";
  10. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
5