aantron / better-enums

C++ compile-time enum to string, iteration, in a single header file
http://aantron.github.io/better-enums
BSD 2-Clause "Simplified" License
1.65k stars 172 forks source link

versions of the _from_string() functions taking const std::string& #31

Open eyalroz opened 8 years ago

eyalroz commented 8 years ago

At the moment, the _from_string() function, its variants, and some additional functions such as _is_valid() take their input string as a const char* , meaning that you can't pass an std::string directly. I would expect to be able to do this without any conversions, wtih std::string being the preferred type for (a lot of / most) string work in C++.

If this is not intentional, I suggest variants be added which take const std::string& parameters.