base64 icon indicating copy to clipboard operation
base64 copied to clipboard

API to return `std::optional<std::string>` rather than throw an exception

Open jiawen opened this issue 1 year ago • 2 comments

I love the modern C++ API - it's very ergonomic.

I'm looking to integrate the library into a codebase that bans exceptions (-fno-exceptions). Any chance we can add an interface that returns std::optional<std::string> (and a version that returns a bool for the write-to-preallocated-buffer version) and an #ifdef to compile out the with-exceptions version?

I'm happy to contribute a PR.

jiawen avatar Jul 26 '24 23:07 jiawen

Same issue

udfordria avatar Apr 21 '25 10:04 udfordria

Hey @jiawen, please feel free to add PR (sorry for the belated answer)

tobiaslocker avatar Apr 22 '25 08:04 tobiaslocker