fork download
  1. #include <iostream>
  2.  
  3. enum e{foo, bar};
  4.  
  5. struct S{
  6. S(int){
  7. std::cout << "int\n";
  8. }
  9. S(e){
  10. std::cout << "enum\n";
  11. }
  12. };
  13.  
  14. int main() {
  15. S{42};
  16. S{foo};
  17. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
int
enum