I have a A_class and I want to force me to create always an instance.
In other words I want to erase the posibility I can call a function without an object.
Now , I can write A_class().my_function and I'd want the compiler tells me 'Can call it'
Thanks
A_class() is a perfectly valid instance. Just a little temporary. And even if you prohibit A_class().function(), people will still be able to do { A_class a; a.function(); } which is (almost?) the same.
As for how to do it, the only thing that comes to mind is make the constructor private and write a public static "Create" function which returns a const A_class object. If you do that, you will be still able to call const methods quickly, but a non const method will require you to store the new A_class object in some variable.