Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Backporting string_view to older compilers

77 views
Skip to first unread message

woodb...@gmail.com

unread,
May 23, 2017, 6:31:47 PM5/23/17
to
I would like to encourage compiler developers to backport string_view to
older versions of their compilers. In particular, I'd like to see GCC, Clang
and MSVC do this.

String_view is one of the more useful elements of C++ 2017 imo.
Unfortunately, string_view wasn't introduced years ago. I hope compiler
vendors will take a "better late than never" attitude toward string_view
and make it available with their C++ 2011 and 2014 compilers.


Brian
Ebenezer Enterprises - So far G-d has helped us.
http://webEbenezer.net

Christian Gollwitzer

unread,
May 24, 2017, 2:50:39 AM5/24/17
to
Am 24.05.17 um 00:31 schrieb woodb...@gmail.com:
> I would like to encourage compiler developers to backport string_view to
> older versions of their compilers. In particular, I'd like to see GCC, Clang
> and MSVC do this.

> String_view is one of the more useful elements of C++ 2017 imo.
> Unfortunately, string_view wasn't introduced years ago. I hope compiler
> vendors will take a "better late than never" attitude toward string_view
> and make it available with their C++ 2011 and 2014 compilers.

Why not just use a newer version of the compiler? All of the three
mentioned by you are for free.

Christian

woodb...@gmail.com

unread,
May 24, 2017, 11:42:36 AM5/24/17
to
On Wednesday, May 24, 2017 at 1:50:39 AM UTC-5, Christian Gollwitzer wrote:
>
> Why not just use a newer version of the compiler? All of the three
> mentioned by you are for free.
>

I can do that myself. This is for people who aren't able to use a
newer version of the compiler. If string_view had been part of C++
2011 or 2014, it would have been better.

Also, I would like to mention this again:
https://groups.google.com/forum/#!topic/comp.lang.c++/yW_BoR4ckzA

It has to do with adding a function like this:

virtual ::std::string_view what_view () const noexcept;

to std::exception. This didn't even make it into C++ 2017. :(


Brian
Ebenezer Enterprises - "And last of all He (Messiah Yeshua) appeared to
me also, as to one of untimely birth." 1st Corinthians 15:8

http://webEbenezer.net

Chris Vine

unread,
May 24, 2017, 7:25:15 PM5/24/17
to
Brian has already been over this before:
http://comp.lang.cpp.narkive.com/YaFSQ5gM/distinguishing-between-maybe-null-vs-never-null-is-the-important-thing#post13

I should beware entering into a discussion of the issue with him:
according to Brian, "... By attacking my reasoning you are attempting
to dissuade people from looking into my work". In other words, you may
be dragged into a debate on his company's commercial product, about
which I have neither any opinion nor any interest.

woodb...@gmail.com

unread,
Sep 30, 2017, 6:50:03 PM9/30/17
to
On Tuesday, May 23, 2017 at 5:31:47 PM UTC-5, woodb...@gmail.com wrote:
> I would like to encourage compiler developers to backport string_view to
> older versions of their compilers. In particular, I'd like to see GCC, Clang
> and MSVC do this.
>
> String_view is one of the more useful elements of C++ 2017 imo.
> Unfortunately, string_view wasn't introduced years ago. I hope compiler
> vendors will take a "better late than never" attitude toward string_view
> and make it available with their C++ 2011 and 2014 compilers.
>

In this talk Titus Winters says they are going
to "pre-adopt" string_view into a library they're
developing:

https://duckduckgo.com/?q=cppcon+videos&atb=v72-1__&ia=videos&iax=1&iai=tISy7EJQPzI

(around the 49 minutes and 40 seconds mark)

This is further indication of the need for this
support for people using C++ 2011 compilers and I
hope compiler vendors will do the porting themselves.


Brian
Ebenezer Enterprises - Enjoying programming again.
http://webEbenezer.net

woodb...@gmail.com

unread,
Oct 2, 2017, 2:56:12 PM10/2/17
to
0 new messages