fork(1) download
  1. #include <iostream>
  2.  
  3. struct MyStruct {
  4. enum { value1 = 1 };
  5. static constexpr int value2 = 1;
  6. };
  7.  
  8. class MyClass {
  9. public:
  10. enum { value1 = 1 };
  11. static constexpr int value2 = 1;
  12. };
  13.  
  14.  
  15. int main() {
  16. std::cout << MyStruct::value1 << " " << MyStruct::value2 << std::endl;
  17. std::cout << MyClass::value1 << " " << MyClass::value2 << std::endl;
  18. return 0;
  19. }
Success #stdin #stdout 0s 4396KB
stdin
Standard input is empty
stdout
1 1
1 1