fork(1) download
  1. class Enum
  2. {
  3. public:
  4. Enum(int v):v(v)
  5. {
  6. }
  7. private:
  8. int v;
  9. //operator == using v
  10. };
  11.  
  12. namespace Enumeration // It is not possible to name it 'Enum'
  13. {
  14. static const Enum var1 = Enum(1);
  15. static const Enum var2 = Enum(2);
  16. }
  17.  
  18. int main()
  19. {
  20. Enumeration::var1;
  21. }
  22.  
Success #stdin #stdout 0.02s 2676KB
stdin
Standard input is empty
stdout
Standard output is empty