fork download
  1. template <typename T>
  2. struct add_pointer { typedef T***************************** type; };
  3.  
  4. template <int N, typename T>
  5. struct add_pointers : add_pointer<typename add_pointers<N-1, T>::type> {};
  6. template <typename T>
  7. struct add_pointers<0, T> { typedef T type; };
  8.  
  9. template <int N, typename T>
  10. struct add_many_pointers : add_pointers<100,typename add_many_pointers<N-1, T>::type> {};
  11. template <typename T>
  12. struct add_many_pointers<0, T> { typedef T type; };
  13.  
  14. int main() {
  15. add_many_pointers<100, int>::type p;
  16. }
Compilation error #stdin compilation error #stdout 0.01s 2720KB
stdin
Standard input is empty
compilation info
g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <http://bugs.gentoo.org/> for instructions.
stdout
Standard output is empty