Skip to content

Conversation

@Code7R
Copy link

@Code7R Code7R commented Jan 18, 2020

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.

The usage needs to be turned on by setting the special define LMDBXX_USE_EXPERIMENTAL_STRING_VIEW .
And adding documentation for alternative modes and type wrapper.
@hoytech
Copy link
Owner

hoytech commented Jan 21, 2020

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
Copy link
Author

Code7R commented Jan 22, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants