serge-sans-paille / frozen

a header-only, constexpr alternative to gperf for C++14 users
Apache License 2.0
1.27k stars 103 forks source link

feature: elsa for std string types #134

Closed impugachev closed 2 years ago

impugachev commented 2 years ago

This will allow using frozen containers with std::string_view(C++17) and std::string(C++20). I'm not sure if tests are needed for this ... I plan to add a heterogeneous search in the next PR, there it will already be possible to write tests that will use the hash for std::string_view.

impugachev commented 2 years ago

@serge-sans-paille could you please take a look?

serge-sans-paille commented 2 years ago

Thanks for the patch - I'm fine with the idea. I'll add C++20 to the validation then you can add a test to make sure this indeed works fine.

serge-sans-paille commented 2 years ago

Validation now supports c++20. You can test with std::string container on C++20. Please rebase on master branch ;-)

impugachev commented 2 years ago

I'm not quite sure what test to write here, so as not to fall into testing the obvious things ... Therefore, I added just one simple test to check compilation

serge-sans-paille commented 2 years ago

I was thinking about testing, say, a frozen::set of std::string. That's what we want in the end, right?

impugachev commented 2 years ago

Ok, I will then add a typed test for searching in frozen containers

serge-sans-paille commented 2 years ago

Looks good, can you rebase on master branch and squash all your commits in one?

impugachev commented 2 years ago

Done @serge-sans-paille, can you please merge?

serge-sans-paille commented 2 years ago

Thanks for your patience o/