`#include <iostream>`

template<long B,unsigned long E>

struct pow_helper

{

static const double value;

};

template<long B,unsigned long E>

const double pow_helper<B,E>::value=B*pow_helper<B,E-1>::value;

template<long B>

struct pow_helper<B,0>

{

static const double value;

};

template<long B>

const double pow_helper<B,0>::value=1;

template<long B,long E>

struct power

{

static const double value;

};

template<long B,long E>

const double power<B,E>::value= E<0 ? 1.0/pow_helper<B,E<0 ? -E : E>::value :

pow_helper<B,E<0 ? -E : E>::value;

int main()

{

std::cout << power<10,-3>::value << std::endl;

}

or this sample compiles without warnings too and does something meaningful also ;-)