Why is singleton class allowed to call its own instance?

前端 未结 0 1255
无人及你
无人及你 2020-12-14 02:11

I have the following code.

#include "iostream"

class A
{
private:
    static A instance;
    A(const A&) = delete;
public:
    A() {};
    stat         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题