Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Base{
- int x=0;
- };
- struct Derived : public Base {
- static int myint =1;
- Derived(){x+=myint;}
- };
- struct Derived2 : public Derived {
- static int myint = 2;
- Derived2(){x+=myint;}
- };
- template<class A>
- struct BaseX : public Base {
- static int myint;
- BaseX() {Base::x+=myint;}
- }
- struct Derived : public BaseX<Derived>;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement