Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mconicx committed Jan 19, 2024
1 parent bae6e19 commit 0efeb53
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ The template is ready to use for further coding, simply open the .sln file in Vi
### Have fun coding!

Changes, pushes, comments are always welcome. Fork and use at your own convenience. The Singleton class is not mine, neither can I find the original author. Possibly from a stackoverflow thread I found only a few years ago, since it works with C++20 only.

> How to use the Singleton class template?
Simply derive your class like this

`class MyClass : public Singleton<MyClass>`

Above this line, you can simplify referencing the class instance in your code like so:

`#define MY_CLASS MAKE_INSTANCE(MyClass)`, which will allow you to use it like `MY_CLASS.MyPublicMethod()`

0 comments on commit 0efeb53

Please sign in to comment.