t**g 发帖数: 1164 | 1 一道面试题:
3. Write a sample code to implement the Singleton pattern.
Was asked under what circumstances the Singleton will fail
(copy constructor also needs to be private, etc).
如果把ctor, copy ctor, =operator全都disallowed
那么singleton还能fail么? | y**i 发帖数: 1112 | 2 singleton需要构造函数,拷贝构造函数和拷贝赋值都是private的吧 |
|