fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Bar {
  5. Bar() = default;
  6. Bar(const Bar &) {
  7. cout << "Copying bar\n";
  8. }
  9. };
  10.  
  11. void foo(const Bar &a) {
  12. [&a] {
  13. }();
  14. }
  15.  
  16. int main() {
  17. foo(Bar());
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
Standard output is empty