fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template<typename>
  5. struct de_cay; // undefined
  6.  
  7. template<size_t N, typename T>
  8. struct de_cay<T[N]> {
  9. static const size_t size = N;
  10. using type = T;
  11. };
  12.  
  13. template<typename T>
  14. struct TypeDefinition;
  15.  
  16. int main()
  17. {
  18. TypeDefinition<de_cay<int[5][2]>::type> td;
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:18:42: error: aggregate 'TypeDefinition<int [2]> td' has incomplete type and cannot be defined
  TypeDefinition<de_cay<int[5][2]>::type> td;
                                          ^
stdout
Standard output is empty