fork download
  1. #include <iostream>
  2. template <class T>
  3. class A {
  4. class B {
  5. public:
  6. T value;
  7. };
  8. public:
  9. B b;
  10. };
  11.  
  12. int main()
  13. {
  14. A<int> a;
  15. a.b.value = 7;
  16. std::cout << a.b.value << std::endl;
  17. }
Success #stdin #stdout 0.02s 2724KB
stdin
Standard input is empty
stdout
7