Closed mkaes closed 1 year ago
Sure, this would be nice to have. I'm not using C++17 with SOCI myself yet, so I don't have any immediate plans to do it, but any PRs would be welcome.
I opened a pull request #1001 But it lacks check to only enable use of std::optional if c++17 or above is used. I am not quite sure how to do this in cmake and I could only test it for sqlite.
PR was merged so I guess this issue could be closed :)
Indeed, thanks.
Soci already provides header to support boost::optional types. As c++17 is becoming more and more used it would be nice if soci would also support std::optional
It is not difficult to write and own type_conversion for std::optional but direct support by a header e.g.
#include <soci/std-optional.h