Aspose.Slides for C++: CodePorting Compatibility with C++ 20

We moved to C++20. however, since in system/object_ext.h file, in lines: 673-678 there is use with a removed function of the std library, the code is not compiling.

template<typename T0, typename T1>
static auto Coalesce(T0 value, T1 func)
{
    using retval_t = typename std::result_of<decltype(func)()>::type;
    return CoalesceInternal<T0, retval_t, typename std::function<retval_t()>>(value, func);
}

https://en.cppreference.com/w/cpp/types/result_of

Currently I’m compiling the library that use Aspose.Slides with C++17, but I need to move to C++20 soon.

@tsachiho,
Thank you for contacting support.

Could you please check your code using the latest version of Aspose.Slides fo C++? If the issue persists, please describe in more detail how to reproduce the problem.

Hi, @andrey.potapov,

Upgrading to latest version (23.7) didn’t solve the issue.

many files have include of #include <system/object_ext.h> which have the lines mentioned in the previous post that are not supported in C++20.

the function was renamed in the move to C++20, so just calling to the new function should be okay.

@tsachiho,
Thank you for the details.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESCPP-3776

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@tsachiho,
Please also share the following additional information:

  • compiler name and its version
  • OS version on which the problem occurred

OS:
Windows 10 Professional Version 21H2
Windows 11 Enterprise Version 22H2

C++ Compiler:
Visual Studio 2019 Professional 16.11.26
Build 19.29.30148.0
with switch: /std:c++20

@tsachiho,
Thank you for the additional information. I’ve forwarded it to our developers.

I see this issue is in resolved status. in which version?

@tsachiho,
Yes, the issue has been resolved. A fix will be included in Aspose.Slides for C++ 23.10. This release will be published in the second half of October, and you be notified.

The issues you found earlier (filed as SLIDESCPP-3776) have been fixed in Aspose.Slides for C++ 23.10 (Windows, Linux, macOS).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.