Closed alt-graph closed 1 year ago
Was the reason to have to_string()
not the absence of a std::string
constructor from string_view
(which of course the 'real' string_view
has)? Or conversion operator, or something?
I have the hunch that we discussed this or other custom-additions to the std::
implementation when we added string_view
.
Can not find that in Gitlab, maybe it has been in Stash, but that repo is deleted (instead of read-only-ed).
Like these:
In principle I believe removing would be fine, but we should not shoot ourselves in the foot ;)
I have the hunch that we discussed this or other custom-additions to the
std::
implementation when we addedstring_view
. Can not find that in Gitlab, maybe it has been in Stash, but that repo is deleted (instead of read-only-ed).
I think we discussed the operators. But in any case to_string()
is obsolete as a member function because string_view
has an explicit conversion to std::string
:
Hope not too many uses already in dependents.
I agree. I just saw Olaf use it in code review and got curious, hence the PR...
This PR removes
gul14::string_view::to_string()
. C++17'sstd::string_view
does not have that member function, so we should not encourage our users to depend on it.See: cppreference on std::string_view