fork download
  1. #include <iostream>
  2.  
  3. template<typename T>
  4. struct C
  5. {
  6. struct Nested
  7. {
  8. Nested* get();
  9. };
  10. };
  11.  
  12. template<typename T>
  13. auto C<T>::Nested::get() -> Nested*
  14. {
  15. return this;
  16. }
  17.  
  18. int main()
  19. {
  20. C<int>::Nested n;
  21. std::cout << n.get();
  22. return 0;
  23. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
0xbfcf0f0f