Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MinGW trouble shooting
#include <iostream>
template<int tInt>
struct Class0
{
int mInt0;
int mInt1;
int mInt2;
int mInt3;
Class0() : mInt0(tInt+0), mInt1(tInt+1), mInt2(tInt+2), mInt3(tInt+3) { }
};
template<int tInt>
struct Class1 :
public Class0<tInt+4*0>,
public Class0<tInt+4*1>,
public Class0<tInt+4*2>,
public Class0<tInt+4*3>
{
};
template<int tInt>
struct Class2 :
public Class1<tInt+16*0>,
public Class1<tInt+16*1>,
public Class1<tInt+16*2>,
public Class1<tInt+16*3>
{
};
template<int tInt>
struct Class3 :
public Class2<tInt+64*0>,
public Class2<tInt+64*1>,
public Class2<tInt+64*2>,
public Class2<tInt+64*3>
{
};
template<int tInt>
struct Class4 :
public Class3<tInt+0x100*0>,
public Class3<tInt+0x100*1>,
public Class3<tInt+0x100*2>,
public Class3<tInt+0x100*3>
{
};
template<int tInt>
struct Class5 :
public Class4<tInt+0x400*0>,
public Class4<tInt+0x400*1>,
public Class4<tInt+0x400*2>,
public Class4<tInt+0x400*3>
{
};
template<int tInt>
struct Class6 :
public Class5<tInt+0x1000*0>,
public Class5<tInt+0x1000*1>,
public Class5<tInt+0x1000*2>,
public Class5<tInt+0x1000*3>
{
};
template<int tInt>
struct Class7 :
public Class6<tInt+0x4000*0>,
public Class6<tInt+0x4000*1>,
public Class6<tInt+0x4000*2>,
public Class6<tInt+0x4000*3>
{
};
int main()
{
Class7<0x10000*0> Class70;
Class7<0x10000*1> Class71;
Class7<0x10000*2> Class72;
Class7<0x10000*3> Class73;
return 0;
}
#include <iostream>
template<int tInt>
struct Class0
{
int mInt0;
int mInt1;
int mInt2;
int mInt3;
Class0() : mInt0(tInt+0), mInt1(tInt+1), mInt2(tInt+2), mInt3(tInt+3) { }
};
template<int tInt>
struct Class1 :
public Class0<tInt+4*0>,
public Class0<tInt+4*1>,
public Class0<tInt+4*2>,
public Class0<tInt+4*3>
{
};
template<int tInt>
struct Class2 :
public Class1<tInt+16*0>,
public Class1<tInt+16*1>,
public Class1<tInt+16*2>,
public Class1<tInt+16*3>
{
};
template<int tInt>
struct Class3 :
public Class2<tInt+64*0>,
public Class2<tInt+64*1>,
public Class2<tInt+64*2>,
public Class2<tInt+64*3>
{
};
template<int tInt>
struct Class4 :
public Class3<tInt+0x100*0>,
public Class3<tInt+0x100*1>,
public Class3<tInt+0x100*2>,
public Class3<tInt+0x100*3>
{
};
template<int tInt>
struct Class5 :
public Class4<tInt+0x400*0>,
public Class4<tInt+0x400*1>,
public Class4<tInt+0x400*2>,
public Class4<tInt+0x400*3>
{
};
template<int tInt>
struct Class6 :
public Class5<tInt+0x1000*0>,
public Class5<tInt+0x1000*1>,
public Class5<tInt+0x1000*2>,
public Class5<tInt+0x1000*3>
{
};
int main()
{
Class6<0x4000*0> Class60;
Class6<0x4000*1> Class61;
Class6<0x4000*2> Class62; // I succeed in build by MinGWx32 when I comment out this line.
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment