|
1 | 1 | # Singleton pattern examples in C++ |
2 | 2 |
|
3 | | -A collection of minimal, self-contained C++ examples demonstrating multiple ways to implement the Singleton design pattern. |
4 | | -The repository includes modern, thread-safe techniques (Meyers Singleton) and legacy aproaches (Raw Pointers, Double-Checked Locking) for comparison. |
| 3 | +A collection of minimal, self-contained C++ examples demonstrating multiple ways to implement the Singleton design pattern. The repository includes modern, thread-safe techniques (Meyers Singleton) and legacy aproaches (Raw Pointers, Double-Checked Locking) for comparison. |
5 | 4 |
|
6 | 5 | ## Prerequisites |
7 | 6 |
|
8 | 7 | Before building, ensure you have the following installed: |
9 | 8 |
|
10 | | -### Windows |
| 9 | +### Common Requirements (All Platforms) |
11 | 10 |
|
12 | 11 | * **CMake** (v3.20 or newer required for Presets) |
13 | 12 |
|
14 | | -### Linux |
| 13 | +### Windows - Visual Studio MSVC (Preset: windows-msvc) |
15 | 14 |
|
16 | | -* **CMake** (v3.20 or newer required for Presets) |
17 | | -* **GCC or Clang + Ninja |
| 15 | +* **Visual Studio 2022** |
| 16 | +* **Workload Required:** Desktop development with C++ |
| 17 | +* **Note:** The preset uses the Visual Studio 17 2022 generator. |
| 18 | + |
| 19 | +### Windows - MinGW (Preset: windows-mingw) |
| 20 | + |
| 21 | +* **MinGW-w64 Toolchain** |
| 22 | +* **Make Tool: mingw32-make** (Included with most MinGW installers). |
| 23 | +* **Configuration:** The bin folder of your MinGW installation (e.g., C:\msys64\mingw64\bin) must be in your system PATH environment variable. |
| 24 | + |
| 25 | +### Linux (Preset: linux-ninja) |
| 26 | + |
| 27 | +* **C++ Compiler:** GCC or Clang (supporting C++17) |
| 28 | + |
| 29 | +* **Generator: Ninja Build System** |
| 30 | + |
| 31 | +Install Command (Ubuntu/Debian): |
18 | 32 | ```bash |
19 | | -sudo apt install build-essential ninja-build |
| 33 | +sudo apt update && sudo apt install build-essential ninja-build cmake |
20 | 34 | ``` |
0 commit comments