On Mon, Dec 2, 2019 at 12:13 PM Krystian Stasiowski via Boost < boost@lists.boost.org> wrote:
On Mon, Dec 2, 2019 at 11:57 AM Zach Laine via Boost < boost@lists.boost.org> wrote:
+1. FWIW, I find "this is a drop-in replacement" to be a typically unattainable goal for anything that is not based on some kind of polymorphism (compile- or runtime). That is, the polymorphic drop-in mechanism only cares about a subset of API and/or behavior.
Perhaps we provide two separate functions like was mentioned previously, where one returns a fixed_string and the other returns a string_view.
Perhaps. I think you were on the right track changing substr() to return a string_view, just not to worry too much about being a drop-in replacement. I think you should only worry about API compatibility where it makes sense. Zach