frobtech wrote: I very much think this is the wrong direction. Using span / string_view style types rather than raw pointer / size pairs is something I really think we should aspire to stick to and move more outlier code towards. `cpp::string_view` is a polyfill for `std::string_view`, which is already actually just `std::basic_string_view<char>`; it's easy enough to templatize the polyfill as well and I don't see why we wouldn't just do that.
In the long run, more Hand-in-Hand work with libc++ will probably give us fuller string_view / span implementations to use directly in our hermetic namespace without reimplementing them all ourselves are we have now in `__support`. So I think putting a bit more work into our `cpp::*` types now--in the direction of being more faithful and complete polyfills of `std::*` counterparts--is not a slippery slope of complicating maintenance, but a sensible interim approach that just further motivates our established long-term intent to collaborate more extensively with libc++ on implementation sharing. On the contrary, I think reverting from span/view-style types to an earlier era's C conventions is itself a slippery slope of backsliding to lose the benefits of our rigorous and modern C++ approach to libc implementation internals. https://github.com/llvm/llvm-project/pull/170959 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
