Skip to content

Commit

Permalink
Fixed singleton.
Browse files Browse the repository at this point in the history
  • Loading branch information
OneMoreGres committed Feb 27, 2017
1 parent 86ad869 commit 0531e81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cheatsheet.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ a|
allow only one instance
```
struct Earth {
Earth () = delete;
static Earth& instance () {
static Earth earth;
return earth;
Expand All @@ -187,6 +186,7 @@ struct Earth {
return radius;
}
private:
Earth ();
int radius;
}
```
Expand Down

0 comments on commit 0531e81

Please sign in to comment.