class Foo
{ 
 private:
    Foo(int){};

  public:
    static void foo();
};

void Foo::foo()
{
   Foo f1;    //illegal
   Foo f2(1); //legal
}

int main()
{
    
}