Skip to content

Commit 22f024a

Browse files
committed
Try C++20 for MSVC hope it enables designated initializers
1 parent 112b61c commit 22f024a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/nob.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ jobs:
4646
# https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#create-your-own-command-prompt-shortcut
4747
run: |
4848
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
49-
cl.exe ${{ matrix.hotreload }} /Fe:nob nob.c
49+
cl.exe /std:c++20 /Fe:nob nob.c
5050
nob.exe
5151
- name: Build how_to-s
5252
shell: cmd
5353
run: |
5454
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
5555
cd how_to/
56-
cl.exe ${{ matrix.hotreload }} /Fe:nob nob.c
56+
cl.exe /std:c++20 /Fe:nob nob.c
5757
nob.exe

shared.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define TESTS_FOLDER "tests/"
1010

1111
#if defined(_MSC_VER)
12-
# define nob_cc_flags(cmd) cmd_append(cmd, "/W4", "/nologo", "/D_CRT_SECURE_NO_WARNINGS", "-I.")
12+
# define nob_cc_flags(cmd) cmd_append(cmd, "/W4", "/nologo", "/std:c++20", "/D_CRT_SECURE_NO_WARNINGS", "-I.")
1313
#elif defined(__APPLE__) || defined(__MACH__)
1414
// TODO: "-std=c99", "-D_POSIX_C_SOURCE=200112L" didn't work for MacOS, don't know why, don't really care that much at the moment.
1515
// Anybody who does feel free to investigate.

0 commit comments

Comments
 (0)