Hello,
Looking into the README.md file for LibreOffice, specific C++ standard
that is used for LibreOffice code is not asserted. On the other hand, we
had discussions over the use of C++20, which is supported on the
baseline compilers that is required to build LibreOffice:
https://git.libreoffice.org/core/
C++20 standard is in fact used in configure.ac and elsewhere:
https://opengrok.libreoffice.org/search?project=core&full=%22-std%3Ac%2B%2B20%22
Also, we have --with-latest-c++ configure option, which can activate the
latest C++ features.
These are the minimum required version of C++ compilers on different
platforms: (further limits are set in configure.ac on VS version, etc.)
Windows:
* Runtime: Windows 10
* Build: wsl-as-helper + Visual Studio 2022
macOS:
* Runtime: 11
* Build: 13 or later + Xcode 14.3 or later (using latest version
available for a given version of macOS)
Linux:
* Runtime: RHEL 9 or CentOS 9 and comparable
* Build: either GCC 13; or Clang 18 with libstdc++ 11
Above compilers may provide some C++23 features. The question here is,
should we use those C++23 features? In that case, we may have to
explicitly use appropriate flags for compilers (on some platforms)
requesting C++23 standard.
To give you a concrete example, we may use C++23 std::to_underlying.
But, using that lead to CI build failure:
Use std::to_underlying instead of o3tl::to_underlying
https://gerrit.libreoffice.org/c/core/+/206360
At the moment, we are using o3tl::to_underlying, which is not bad IMO.
Then, should we move to C++23, or should we wait and not use C++23
features at the moment? And, is there a need to explicitly clarify the
C++20 or C++23 in README.md?
Please share your ideas.
Regards,
Hossein
--
Hossein Nourikhah, Ph.D., Developer Community Architect
Tel: +49 30 5557992-65 | Email: [email protected]
The Document Foundation, Winterfeldtstraße 52, 10781 Berlin, DE
Gemeinnützige rechtsfähige Stiftung des bürgerlichen Rechts
Legal details: https://www.documentfoundation.org/imprint