antlr4 icon indicating copy to clipboard operation
antlr4 copied to clipboard

Minimum requirements for Cpp target is "C++17", not "C++11"

Open kaby76 opened this issue 3 years ago • 0 comments

As found yet again--this time in this StackOverflow question--the minimum requirement is C++17 for the Cpp target. But, the "doc"/"readme's" still have references to "C++11". The minimum requirement has been that way since Dec '21 https://github.com/antlr/antlr4/pull/3335. It's now Aug '22. Doc is just like code--it needs to be maintained. @jcking

Here are all the occurrences of "C++11" in the master and dev branches. I suggest also changing the value of CMAKE_CXX_STANDARD mentioned in the documentation since "17" is not any different than the minimum requirement.

Kenne@DESKTOP-DL44R7B MINGW64 ~/check
$ git clone https://github.com/antlr/antlr4.git
Cloning into 'antlr4'...
remote: Enumerating objects: 129519, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 129519 (delta 13), reused 27 (delta 9), pack-reused 129481
Receiving objects: 100% (129519/129519), 65.98 MiB | 26.50 MiB/s, done.
Resolving deltas: 100% (76310/76310), done.
Updating files: 100% (2377/2377), done.

Kenne@DESKTOP-DL44R7B MINGW64 ~/check
$ cd antlr4/

Kenne@DESKTOP-DL44R7B MINGW64 ~/check/antlr4
$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

Kenne@DESKTOP-DL44R7B MINGW64 ~/check/antlr4
$ grep . -R -E -i -e 'c[+][+]11'
./doc/cpp-target.md:The C++ target supports all platforms that can either run MS Visual Studio 2013 (or newer), XCode 7 (or newer) or CMake (C++11 required). All build tools can either create static or dynamic libraries, both as 64bit or 32bit arch. Additionally, XCode can create an iOS library. Also see [Antlr4 for C++ with CMake: A practical example](http://blorente.me/beyond-the-loop/Antlr-cpp-cmake/).
./runtime/Cpp/README.md:The minimum C++ version to compile the ANTLR C++ runtime with is C++11. The supplied projects can built the runtime either as static or dynamic library, as both 32bit and 64bit arch. The macOS project contains a target for iOS and can also be built using cmake (instead of XCode).
./runtime/Cpp/README.md:By default, the libraries produced by the CMake build target C++11. If you want to target a different C++ standard, you can explicitly pass the standard - e.g. `-DCMAKE_CXX_STANDARD=17`.

Kenne@DESKTOP-DL44R7B MINGW64 ~/check/antlr4
$ git checkout dev
Updating files: 100% (516/516), done.
Branch 'dev' set up to track remote branch 'dev' from 'origin'.
Switched to a new branch 'dev'

Kenne@DESKTOP-DL44R7B MINGW64 ~/check/antlr4
$ grep . -R -E -i -e 'c[+][+]11'
./doc/cpp-target.md:The C++ target supports all platforms that can either run MS Visual Studio 2013 (or newer), XCode 7 (or newer) or CMake (C++11 required). All build tools can either create static or dynamic libraries, both as 64bit or 32bit arch. Additionally, XCode can create an iOS library. Also see [Antlr4 for C++ with CMake: A practical example](http://blorente.me/beyond-the-loop/Antlr-cpp-cmake/).
./runtime/Cpp/README.md:The minimum C++ version to compile the ANTLR C++ runtime with is C++11. The supplied projects can built the runtime either as static or dynamic library, as both 32bit and 64bit arch. The macOS project contains a target for iOS and can also be built using cmake (instead of XCode).
./runtime/Cpp/README.md:By default, the libraries produced by the CMake build target C++11. If you want to target a different C++ standard, you can explicitly pass the standard - e.g. `-DCMAKE_CXX_STANDARD=17`.

Kenne@DESKTOP-DL44R7B MINGW64 ~/check/antlr4

kaby76 avatar Aug 03 '22 11:08 kaby76