Skip to content

Instantly share code, notes, and snippets.

@smiler
Created November 6, 2013 13:53
Show Gist options
  • Select an option

  • Save smiler/7336394 to your computer and use it in GitHub Desktop.

Select an option

Save smiler/7336394 to your computer and use it in GitHub Desktop.
lol.cpp:2:18: error: template instantiation depth exceeds maximum of 900 (use -ftemplate-depth= to increase the maximum) instantiating ‘Lol<T*> Lol<T>::operator->() [with T = int************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************]’
lol.cpp:2:18: recursively required from ‘Lol<T*> Lol<T>::operator->() [with T = int]’
lol.cpp:2:18: required from here
lol.cpp:2:18: error: template instantiation depth exceeds maximum of 900 (use -ftemplate-depth= to increase the maximum) instantiating ‘struct Lol<int*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************>’
lol.cpp:2:18: recursively required from ‘Lol<T*> Lol<T>::operator->() [with T = int]’
lol.cpp:2:18: required from here
lol.cpp:2:18: error: invalid use of incomplete type ‘struct Lol<int*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************>’
lol.cpp:1:26: error: declaration of ‘struct Lol<int*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************>’
// g++ -o lol lol.cpp
template<class T> struct Lol { Lol<T*> operator->(); };
Lol<int> i, j = i->heuh;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment