Commenti a: Singleton revisited https://www.italiancpp.org/2017/03/19/singleton-revisited-eng/ Mon, 20 Mar 2017 21:21:21 +0000 hourly 1 https://wordpress.org/?v=4.7.18 Di: Giuseppe https://www.italiancpp.org/2017/03/19/singleton-revisited-eng/#comment-652 Mon, 20 Mar 2017 21:21:21 +0000 http://www.italiancpp.org/?p=7740#comment-652 to make it private. That way you can only get an instance of Logger calling its static get method which, in turn, will return the only possible instance.

]]>
Di: Giuseppe https://www.italiancpp.org/2017/03/19/singleton-revisited-eng/#comment-651 Mon, 20 Mar 2017 21:13:58 +0000 http://www.italiancpp.org/?p=7740#comment-651 to have it private. That way you can only get an instance of Logger calling its static get method which, in turn, will return the only possible instance.

]]>
Di: Alexander Revo https://www.italiancpp.org/2017/03/19/singleton-revisited-eng/#comment-650 Mon, 20 Mar 2017 20:54:27 +0000 http://www.italiancpp.org/?p=7740#comment-650 To make it private, which you can only do by explicitly declaring it so.

]]>
Di: Ying https://www.italiancpp.org/2017/03/19/singleton-revisited-eng/#comment-649 Mon, 20 Mar 2017 11:06:49 +0000 http://www.italiancpp.org/?p=7740#comment-649 Why do you need this: Logger() = default; ?

]]>