Sobes.tech
Middle

šablons <typename> struct Base { int i = 0; }; template <typename T> struct Deriv : Base<T> { void foo() { i = 1; // kļūda: 'i' nav deklarēts šajā apgabalā } }; struct Foo : Deriv<Foo> { void bar() { i = 2; } };