fork(11) download
  1. #include <iostream>
  2. int main(int argc, char** argv) {
  3. bool gg;
  4. if( [&]()->decltype(gg){
  5.  
  6. return true; //try changing this to true or false and you'll get the same result.
  7.  
  8. }() == true){
  9.  
  10. std::cout<<"all even"<<std::endl;
  11. }else {
  12. std::cout<<"all odd"<<std::endl;
  13. }
  14.  
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
all even