Update to c++23

This commit is contained in:
Curt Spark 2025-11-19 22:20:32 +00:00
parent e216b6b94d
commit d85e4e2bdc
3 changed files with 4 additions and 2 deletions

View File

@ -2,6 +2,7 @@
{ {
"arguments": [ "arguments": [
"/run/current-system/sw/bin/clang++", "/run/current-system/sw/bin/clang++",
"-std=c++23",
"-resource-dir", "-resource-dir",
"/nix/store/k2s6xfca52n25yb8b6f58i87kszp3m7g-clang-wrapper-21.1.2/resource-root", "/nix/store/k2s6xfca52n25yb8b6f58i87kszp3m7g-clang-wrapper-21.1.2/resource-root",
"-idirafter", "-idirafter",

View File

@ -1,5 +1,6 @@
#include <iostream> #include <iostream>
#include <print>
int main() { int main() {
std::cout << "Hello, world!" << std::endl; std::println("Hello, world!");
} }

2
run.sh
View File

@ -2,6 +2,6 @@
rm a.out rm a.out
clang++ main.cpp clang++ -std=c++23 main.cpp
./a.out ./a.out