microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
7.96k stars 1.65k forks source link

making tasks handle types with no default constructor #1654

Open julienlopez opened 2 years ago

julienlopez commented 2 years ago

Hello,

Working on a small toy project, I could use support for types with no default constructor in tasks.

From what I've seen in the code, that could be handled pretty easily and with no major drawback with an std::optional if c++17 is activated.

Would it be possible to include something like this ? (I can work on a PR if it's ok)

What would be the prefered way to manage this? add a compile option? do it by default when c++17 is activated? something else?