Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-18 Thread Duncan P. N. Exon Smith via cfe-commits
> On 2017-Jun-18, at 10:46, Duncan P. N. Exon Smith > wrote: > >> >> On 2017-Jun-16, at 05:58, Duncan Exon Smith > > wrote: >> >> >> On Jun 15, 2017, at 22:22, Eric Fiselier > >

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-18 Thread Duncan P. N. Exon Smith via cfe-commits
> On 2017-Jun-16, at 05:58, Duncan Exon Smith wrote: > > > On Jun 15, 2017, at 22:22, Eric Fiselier > > wrote: > >> >> >> On Thu, Jun 15, 2017 at 11:00 PM, Duncan P. N. Exon Smith >>

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-16 Thread Duncan Exon Smith via cfe-commits
> On Jun 15, 2017, at 22:22, Eric Fiselier wrote: > > > >> On Thu, Jun 15, 2017 at 11:00 PM, Duncan P. N. Exon Smith >> wrote: >> Your suggestion is essentially to replace experimental/string_view with >> something like: >> >> namespace std { inline

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-15 Thread Eric Fiselier via cfe-commits
On Jun 15, 2017 11:22 PM, "Eric Fiselier" wrote: On Thu, Jun 15, 2017 at 11:00 PM, Duncan P. N. Exon Smith < dexonsm...@apple.com> wrote: > Your suggestion is essentially to replace experimental/string_view with > something like: > > namespace std { inline namespace __1 {

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-15 Thread Eric Fiselier via cfe-commits
On Thu, Jun 15, 2017 at 11:00 PM, Duncan P. N. Exon Smith < dexonsm...@apple.com> wrote: > Your suggestion is essentially to replace experimental/string_view with > something like: > > namespace std { inline namespace __1 { namespace experimental { > template > using

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-15 Thread Duncan P. N. Exon Smith via cfe-commits
Your suggestion is essentially to replace experimental/string_view with something like: namespace std { inline namespace __1 { namespace experimental { template using basic_string_view = _VSTD::basic_string_view; }}} That breaks: 1. User compiles 1.cpp with older toolchain.

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-15 Thread Eric Fiselier via cfe-commits
I would also want to do serious performance analysis on this patch. Does removing the string_view overloads cause less optimal overloads to be chosen? Perhaps allocating ones? That would be really unfortunate, and I'm not sure that's in the best interest of our users at large. /Eric On Thu, Jun

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-15 Thread Eric Fiselier via cfe-commits
I should mention that depends on C++17 string_view in older dialects :-S So this change will break that. I would prefer to fix your specific use case by making std::experimental::string_view literally be std::string_view. /Eric On Thu, Jun 15, 2017 at 8:42 PM, Eric Fiselier

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-15 Thread Duncan P. N. Exon Smith via cfe-commits
On Jun 15, 2017, at 19:42, Eric Fiselier wrote:On Thu, Jun 15, 2017 at 8:38 PM, Duncan P. N. Exon Smith  wrote:I just started working on a patch to add #if guards, and the first interesting thing I found was the basic_string constructor:template template

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-15 Thread Eric Fiselier via cfe-commits
On Thu, Jun 15, 2017 at 8:38 PM, Duncan P. N. Exon Smith < dexonsm...@apple.com> wrote: > I just started working on a patch to add #if guards, and the first > interesting thing I found was the basic_string constructor: > > template > template > basic_string<_CharT, _Traits,

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-15 Thread Duncan P. N. Exon Smith via cfe-commits
Ah, also the enable_if for same: > template > _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS > basic_string(const _Tp& __t, size_type __pos, size_type __n, > const allocator_type& __a = allocator_type(), > typename >

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-15 Thread Duncan P. N. Exon Smith via cfe-commits
I just started working on a patch to add #if guards, and the first interesting thing I found was the basic_string constructor: > template > template > basic_string<_CharT, _Traits, _Allocator>::basic_string( > const _Tp& __t, size_type __pos, size_type __n, const >

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-15 Thread Eric Fiselier via cfe-commits
It *shouldn't* include , that's a given. IIRC, and Marshall would know better, I believe it was untenable to maintain a version of that didn't depend on after making the changes required for C++17. However inspecting now it does seem possible that the entanglement is avoidable.Though it's

Re: [libcxx] r276238 - Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459

2017-06-15 Thread Duncan P. N. Exon Smith via cfe-commits
> On Jul 20, 2016, at 22:31, Marshall Clow via cfe-commits > wrote: > > Modified: libcxx/trunk/include/string > URL: > http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=276238=276237=276238=diff >