class TConst
{
    const int i;
    int& ref;
    public:
    TConst(int n):i(n),ref(n){}
    static void p1(){prn(i);}//error here
};

My compiler generates an error when I try to use a const class member in a static member-function.

Why is it not allowed?

Edit
Report