Hello,

Even though my exposure to the LibreOffice codebase is limited, I'd like to share my thoughts.

I think moving to C++23 at this point is risky, since many compilers do not yet implement it in a robust and consistent way. Moreover, it is not clear what concrete advantages C++23 would bring to LibreOffice development. I agree that we should explicitly state in README.md that LibreOffice uses C++20 as its baseline standard.

One approach could be to conditionally support C++23. That way we could experiment with new feature of C++23. On the other hand, it would likely require duplicating code and adding complexity and it may not be a priority for the project right now.

Best,

Vissarion.

On 6/13/26 15:01, Hossein Nourikhah wrote:
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

Reply via email to