fork(1) download
  1. #include <climits>
  2.  
  3. template<bool Condition, typename T>
  4. struct EnableIf;
  5. template<typename T>
  6. struct EnableIf<true, T>
  7. {
  8. typedef T Type;
  9. };
  10.  
  11. struct Foo
  12. {
  13. enum
  14. {
  15. Sum = 1
  16. };
  17. private:
  18. enum
  19. {
  20. MyCondition = ULONG_MAX > Sum
  21. };
  22. public:
  23. typedef EnableIf<MyCondition, unsigned long int>::Type ProbabilityType;
  24. };
  25.  
  26. int main()
  27. {
  28. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty