Hello Mark, I repeat because at some point I introduced some element of confusion: for now the library will be compiled with enforced set(CMAKE_CXX_STANDARD 17) and the public API will use only C++17 types/functions. std::span and std::format usage, as it is now, will be hidden by use of fillers in different namespaces. As such, the PoDoFo headers/binaries themselves will be safe to use in a C++20 compiled project including/linking PoDoFo.
In PoDoFo non header exposed code (compilation units only) I may take a little bit more freedom, like for example using some fillers to enlarge compiler support even for C++17 features that were added in very late compiler versions. For example floating point std::from_chars overloads[1] were added only in gcc11. The minimum requirements for PoDoFo-next compilation for the most popular compilers/toolchains should be: - gcc 8.1 - clang/llvm 7.0 - msvc++ 14.16 (VS 2017 15.9) Cheers, Francesco [1] https://en.cppreference.com/w/cpp/utility/from_chars On Tue, 10 May 2022 at 18:11, Mark Rogers <mark.rog...@powermapper.com> wrote: > > Hi > > I don't think any of the main compilers have complete C++20 support yet, and > defects are still being found in the C++20 standard so it's not completely > stable: > > GCC partial C++20 support > https://gcc.gnu.org/projects/cxx-status.html#cxx20 > > Clang partial C++20 support > https://clang.llvm.org/cxx_status.html#cxx20 > > VC++ partial C++20 support > https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/ > > Additionally some defects in the C++20 standard are still being discovered: > https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/#iso-c20-continuing-work-defect-reports-and-clarifications > > It might be ok to use selected C++20 features, but how easy is it to identify > which parts of the C++20 standard are stable and are available across the > main compilers? > > Best Regards > Mark > > -- > Mark Rogers - mark.rog...@powermapper.com > PowerMapper Software Ltd - www.powermapper.com > Registered in Scotland No 362274 Quartermile 2 Edinburgh EH3 9GL > > > > On 05/05/2022, 08:43, "Francesco Pretto" <cez...@gmail.com> wrote: > > Hi Christopher, > > On Thu, 5 May 2022 at 08:16, Christopher Creutzig > <ccreu...@mathworks.com> wrote: > > > > Backporting required parts of std::span and having a layer that > switches between std::format and fmtlib shouldn’t be too hard, assuming these > are only used internally and nothing in the API expects span inputs, for > example. But would we require contributors to use a C++20 enabled compiler? > > > > > > Please note that what you suggest it's already in place in pdfmm: I > use fmtlib in place of std::format and a backported std::span. > > Thinking a little bit more about the topic, let's not argue too much > about this: for the API/ABI surface I will just stick to C++17 > requirement and hide the fact I'm using std::format and std::span. > > Cheers, > Francesco > > > _______________________________________________ > Podofo-users mailing list > Podofo-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/podofo-users > _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users