LO 24.2 C++20 baseline

Stephan Bergmann sbergman at redhat.com
Thu Oct 5 14:49:39 UTC 2023


On 10/4/23 13:56, Stephan Bergmann wrote:
> As 
> <https://git.libreoffice.org/core/+/5a40abc86b94c0be5b4a252c6ab5b0b0df6e520d%5E%21> "Drop some newly obsolete __cplusplus version checks" revealed, "at least for VS 2019 16.11.30 (but not for at least VS 2022 17.7.4), in /clr mode (e.g., when compiling cli_ure/source/climaker/climaker_app.cxx), the -std:c++20 is effectively ignored, and compilation of such source files failed with
> 
>> include\rtl/string.hxx(191): error C2955: 'rtl::OStringLiteral': use 
>> of class template requires template argument list
>> include\rtl/string.hxx(88): note: see declaration of 
>> 'rtl::OStringLiteral'
>> include\rtl/string.hxx(191): error C7592: a non-type 
>> template-parameter of type 'rtl::OStringLiteral' requires at least 
>> '/std:c++20'
>> include\rtl/string.hxx(397): error C2955: 'rtl::OStringLiteral': use 
>> of class template requires template argument list
>> include\rtl/string.hxx(88): note: see declaration of 
>> 'rtl::OStringLiteral'
> 
> etc.  To work around that, keep the 
> <https://git.libreoffice.org/core/+/27d1f3ac016d77d3c907cebedca558308f366855%5E!/> 'O[U]String literals (unusable for now, C++20 only)' functionality disabled when compiling /clr sources (i.e., where _MANAGED is defined) for that old compiler."

As we just found out on IRC when Heiko ran into the above failures when 
compiling cli_ure/source/climaker/climaker_app.cxx, this apparently also 
affects old versions of VS 2022, not just VS 2019:

> Okt 05 14:58:32 <sberg>	htietze, (1) what exact version of MSVC are you using?  (2) show a useful tail of your log, not just a single line
> Okt 05 15:01:50 <htietze>	10.0.40219 MSVC++ 2010 (according the apps info)
> Okt 05 15:02:11 <htietze>	and 14.30.30704 2015-2022
> Okt 05 15:03:12 <htietze>	VS Build Tools 2022 / 17.7.4
> Okt 05 15:04:50 <sberg>	htietze, according to <https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering>, "14.30" probably means "Visual Studio 2022 version 17.0.1"; can you update to the latest version of "Visual Studio 2022" please?
> Okt 05 15:10:11 <htietze>	mikekaganski: --with-visual-studio=2022
> Okt 05 16:35:05 <htietze>	sberg: Build seems to work again after updating VS to 17.7.4. Thanks for the help.



More information about the LibreOffice mailing list