If your current compiler doesn't yet support C++11, you can initialize the vector contents using standard algorithms and functors:
class sig
{
public:
sig()
{
struct Functor
{
Functor() : value(0) {};
int operator ()() { return value++; };
int value;
};
std::generate(p_list, p_list + 4, Functor());
}
int p_list[4];
};
Previous snippet example here.
Yes, is kind of ugly (at least, it looks ugly for me) and doesn't do the work at compile time; but it does the work that you need in the constructor.
If you need some other kind of initialization (initialization with even/odd numbers, initialization with random values, start with anoter value, etc...) you only need to change the Functor, and this is the only advantage of this ugly approach.