[poppler] Increasing the C++ standard to C++17

William Bader williambader at hotmail.com
Mon Sep 27 04:52:10 UTC 2021


I have been building poppler on my CentOS 6 server by building a recent gcc, and then building poppler with -fabi-version=2 (to use an ABI compatible with CentOS 6 g++ 4.4.7) and -static-libstdc++ (so I don't have to install a new library). I also built static versions of some of the libraries that poppler uses, and sometimes I have to edit the CMakeFiles/*.dir/link.txt files to get a clean link. In the end, I get poppler utility executables that can run on stock CentOS 6 systems.
Theoretically any distribution that could still build a recent gcc could build poppler, although would a distribution with an old gcc (I think that -std=gnu++17 was added in gcc 9, released May 2019) push anything but bug fixes for packages?
William


________________________________
From: poppler on behalf of Oliver Sander
Sent: Sunday, September 26, 2021 11:35 PM
To: poppler at lists.freedesktop.org
Subject: Re: [poppler] Increasing the C++ standard to C++17

No objections besides the one mentioned by Leonard.

It would also allow to replace Object by std::variant.

Best,
Oliver

On 27.09.21 00:10, Leonard Rosenthol wrote:
> The only downside is that it will prevent the use of Poppler on some Unix/Linux distros due to older GCCs being present…
>
> Leonard
>
> *From: *poppler <poppler-bounces at lists.freedesktop.org> on behalf of Albert Astals Cid <aacid at kde.org>
> *Date: *Sunday, September 26, 2021 at 1:39 PM
> *To: *poppler at lists.freedesktop.org <poppler at lists.freedesktop.org>
> *Subject: *[poppler] Increasing the C++ standard to C++17
>
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fpoppler%2Fpoppler%2F-%2Fmerge_requests%2F941&data=04%7C01%7Clrosenth%40adobe.com%7Cc33a75763a164819582908d9811496d9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637682747700153065%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6nEff8jwrD2KwOnWhi6xsbI1tSb9YXsl%2F%2Fcu4YQciUE%3D&reserved=0 <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fpoppler%2Fpoppler%2F-%2Fmerge_requests%2F941&data=04%7C01%7Clrosenth%40adobe.com%7Cc33a75763a164819582908d9811496d9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637682747700153065%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6nEff8jwrD2KwOnWhi6xsbI1tSb9YXsl%2F%2Fcu4YQciUE%3D&reserved=0>
>
> Anyone against it?
>
> It would allow us to use std::optional which would allow us to change things like
>
> std::unique_ptr<GooString> readMetadata();
>
> to
>
> std::optional<std::string> readMetadata();
>
> where you can differentiate between "no metadata" and "empty metadata" without having to use a pointer.
>
> Seems better API to me.
>
> All the things in the gitlab CI built fine and I don't think the mac/windows builders would be a problem to get the increased C++ standard.
>
> Cheers,
>    Albert
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20210927/6e5070ce/attachment.htm>


More information about the poppler mailing list