public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Tom Tromey <tom@tromey.com>
Cc: Jason Merrill <jason@redhat.com>,
	 Richard Biener <richard.guenther@gmail.com>,
	 Jonathan Wakely <jwakely.gcc@gmail.com>,
	 nick <xerofoify@gmail.com>,  gcc Mailing List <gcc@gcc.gnu.org>
Subject: Re: Moving to C++11
Date: Thu, 26 Sep 2019 18:32:00 -0000	[thread overview]
Message-ID: <mptsgoiewnp.fsf@arm.com> (raw)
In-Reply-To: <87y2ybeyf7.fsf@tromey.com> (Tom Tromey's message of "Thu, 26 Sep	2019 11:54:04 -0600")

Tom Tromey <tom@tromey.com> writes:
>>>>>> "Jason" == Jason Merrill <jason@redhat.com> writes:
>
> Jason> Note that std::move is from C++11.
>
>>> I'm not too worried about requiring even a C++14 compiler, for the
>>> set of products we still release latest compilers we have newer
>>> GCCs available we can use for building them (even if those are
>>> not our primary supported compilers which would limit us to
>>> GCC 4.8).
>
> Jason> I wouldn't object to C++14, but there's nothing in there I
> Jason> particularly want to use, so it seems unnecessary.
>
>>> Note I'd still not like to see more C++ feature creep into general
>>> non-container/infrastructure code, C++ is complex enough as-is.
>
> Jason> I agree for rvalue references.  I want to start using C++11 'auto' in
> Jason> local variable declarations.
>
> FWIW in gdb we went with C++11, because it was the version that offered
> the most useful upgrades -- for me those was mainly move and foreach,
> but 'auto' is sometimes nice as well.

FWIW, on top of what's already been mentioned:

- "= default" would be very useful for some of the core types

- explicit conversion operators would avoid dangerous implicit conversions
  to things like bool.  E.g. it should be safe to provide an explicit
  operator bool() for poly_int and avoid those pesky known_eq (..., 0)/
  maybe_ne (..., 0) conditions

- templated type aliases would simplify wide_int

Richard

  reply	other threads:[~2019-09-26 18:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26  4:10 Nicholas Krause
2019-09-26  7:23 ` Jonathan Wakely
2019-09-26  8:08   ` Richard Biener
2019-09-26 16:30     ` Nicholas Krause
2019-09-26 17:27     ` Jason Merrill
2019-09-26 17:54       ` Tom Tromey
2019-09-26 18:32         ` Richard Sandiford [this message]
2019-09-26 23:03     ` Pedro Alves
2019-09-27  0:17 ` Eric Gallager
2019-09-29 22:57 Nicholas Krause
2019-09-30 17:50 Nicholas Krause

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mptsgoiewnp.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=jwakely.gcc@gmail.com \
    --cc=richard.guenther@gmail.com \
    --cc=tom@tromey.com \
    --cc=xerofoify@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).