fork(1) download
  1. #include <type_traits>
  2.  
  3. template <int A, int B>
  4. struct S
  5. {
  6. void fun() {}
  7.  
  8. template <class T = void>
  9. typename std::enable_if<B == 1, T>::type
  10. fun1()
  11. {
  12. }
  13. };
  14.  
  15.  
  16. int main()
  17. {
  18. S<0,0> s0;
  19. s0.fun();
  20. S<0,1> s1;
  21. s1.fun();
  22. s1.fun1();
  23. return 0;
  24. }
Success #stdin #stdout 0s 2892KB
stdin
Standard input is empty
stdout
Standard output is empty