template<bool Condition, typename T = void>
struct EnableIf
{
};
template<typename T>
struct EnableIf<true, T>
{
	typedef T Type;
};

struct Base
{
	static const int Foo = 0;
};

template<int KeySize>
struct Derived : public EnableIf<true, Base>::Type
{
	static const int Bar = Foo;
};

int main()
{
	Derived<42> Inst;
}