hoytech / lmdbxx

C++17 wrapper for the LMDB embedded B+ tree database library
The Unlicense
51 stars 16 forks source link

Feature/experimental string view #1

Open Code7R opened 4 years ago

Code7R commented 4 years ago

This adds possibility to use the C++17 variant without need of -std=c++17, virtually any GCC version from 2015 on should be sufficient.

The feature compatibility of std::experimental::string_view is queried, however there might be a gap in the first months of 2014 where the header did not exist yet. But anyhow, the impact from that is probably only a confusing error message about missing header, and also >>5y old compilers can be probably ignored.

hoytech commented 4 years ago

Thanks for the PR!

I don't see anything wrong with the pull request itself. My only hesitation is that it makes the code slightly messier, and we have to remember to always use lmdb::string_view instead of std::string_view.

Are there a lot of installations of compilers with this experimental header, but without C++17 support?

Code7R commented 4 years ago

Depends on the industry you are working for, sometimes you need to deal with toolchains based on FOSS landscape from 2016.