fork download
  1. #include <type_traits>
  2.  
  3. template <int value, typename Enable = void>
  4. class Test;
  5.  
  6. template <int value>
  7. class Test<value, typename std::enable_if<(value >= 1 && value <= 100)>::type>
  8. {
  9.  
  10. };
  11.  
  12. int main()
  13. {
  14. Test<100> a;
  15. Test<101> b;
  16.  
  17. return 0;
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:15:15: error: aggregate 'Test<101> b' has incomplete type and cannot be defined
stdout
Standard output is empty