fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template <class T>
  5. struct test1 {
  6. enum test2 {
  7. test3, test4
  8. };
  9. friend test2 operator | (test2 f1, test2 f2) {
  10. return static_cast<test2>(
  11. static_cast<unsigned>(f1) | static_cast<unsigned>(f2)
  12. );
  13. }
  14. };
  15.  
  16. int main() {
  17. test1<int>::test2 flags = test1<int>::test3 | test1<int>::test4;
  18. }
Success #stdin #stdout 0s 3092KB
stdin
Standard input is empty
stdout
Standard output is empty