fork(1) download
  1. #include <iostream>
  2. #include <type_traits>
  3.  
  4.  
  5. template <int SZ>
  6. class Internal
  7. {
  8. char arr[SZ];
  9. };
  10.  
  11. template < int SZ>
  12. struct helper
  13. {
  14. typedef typename std::enable_if<(SZ > 1000 && SZ <9999) ,Internal<SZ>>::type type;
  15. };
  16.  
  17. template < int SZ>
  18. struct A : public helper<SZ>::type
  19. {};
  20.  
  21. int main() {
  22. A<1024> x;
  23.  
  24. //NG
  25. //A<-34> y;
  26. return 0;
  27. }
Success #stdin #stdout 0s 3292KB
stdin
Standard input is empty
stdout
Standard output is empty