I'm using a boost library which uses boost::string_view. However, I would like to use std::string_view in my code.
Q: What's the best way to convert between these two?
At the moment I'm using:
void foo(std::string_view sv) {
# ...
}
void foo(boost::string_view bsv) {
foo(std::string(bsv));
}
But this creates an unnecessary string.