From ce171862bc2e59e36e3a47a7dd6e05125eaa500d Mon Sep 17 00:00:00 2001 From: cpp-tutor Date: Sun, 21 Jan 2024 12:00:57 +0000 Subject: [PATCH] Ready for release 1.1-C++23 --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index da60838..0a38ab9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ ## Contents -All of the source Markdown pages for the Modern C++ Tutorial on https://learnmoderncpp.com/ plus complete, working programs from the course text. +All of the source Markdown pages for the Modern C++ Tutorial on https://learnmoderncpp.com/ plus complete, working programs machine-extracted from the course text. + +**Note:** Some Chapters have had significant changes made to update them to C++23, and not all programs compile successfully yet. In particular, use of `std::println()` with `import std;` does not compile. In case of issues with your compiler please see the Releases page for the C++20 version of the Tutorial. The "headers" subdirectory contains C++ programs with legacy header `#includes`, whilst the "modules" subdirectory contains the same programs using the `import` keyword instead. See https://learnmoderncpp.com/2020/09/05/where-are-c-modules/ for more details about C++ compilers which have support for modules. @@ -10,7 +12,7 @@ The "scripts" subdirectory contains a C++ program which extracts all programs fr ## Compiling under Windows -Most programs compile successfully under Windows with Visual Studio 2022 (v17.5 or later), some of the modules versions do not currently compile. +Most programs compile successfully under Windows with Visual Studio 2022 (v17.8 or later), some of the modules versions (as noted above) do not currently compile. The supplied batch scripts `build-vs2022-headers.bat` and `build-vs2022-modules.bat` can be used to compile all of the programs within a Visual Studio command prompt, simply run: @@ -20,7 +22,7 @@ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvar or similar in a command window, or create a desktop link, and then run either of the build scripts. -Alternatively, to compile individual programs from within a Visual Studio command prompt run either (modules): +Alternatively, to compile individual programs from within a Visual Studio command prompt, run either (modules): ``` cl /EHsc /std:c++latest /MTd 00-example.cpp @@ -39,13 +41,13 @@ substituting the correct file for `00-example.cpp` in either case. Note that the To compile individual programs in the "headers" subdirectory under Linux, use: ``` -g++ -std=c++20 -o 00-example 00-example.cpp +g++ -std=c++23 -o 00-example 00-example.cpp ``` or: ``` -clang++ -std=c++20 -o 00-example 00-example.cpp +clang++ -std=c++23 -o 00-example 00-example.cpp ``` substituting both occurrencies of `00-example` with the correct file name.