SqliteModernCpp / sqlite_modern_cpp

The C++14 wrapper around sqlite library
MIT License
896 stars 155 forks source link

Added undef of __cpp_lib_uncaught_exceptions when iOS < 10.0 #210

Closed Szpaqn closed 3 years ago

Szpaqn commented 3 years ago

Added undef of __cpp_lib_uncaught_exceptions when iOS version lower than 10.0

aminroosta commented 3 years ago

@Szpaqn Looks good, but before i merge could you explain what the background is?

Szpaqn commented 3 years ago

Hi @aminroosta,

I wanted to contact you, but didn't know how.

I have an issue with Xcode version > 12 and target iOS version < 10.0. std::uncaught_exceptions is available only for iOS 10.0 and higher, but __cpp_lib_uncaught_exceptions is still defined even if I build for iOS 9.0 or lower.

I couldn't add a branch and create a PR in the repo, so I created a fork.

If you could merge it to the main repository it would be great.

Just before you do, let me change the place where the undefine is made. I think that the main header file (sqlite_modern_cpp.h) will be better suited. What do you think?

Szpaqn commented 3 years ago

@aminroosta I have changed the location for checking iOS version. Code ready to merge from my side.

aminroosta commented 3 years ago

Thanks @Szpaqn, Merged.