public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Lancelot SIX <Lancelot.Six@amd.com>,
	 Andrew Burgess <aburgess@redhat.com>,
	 Tom de Vries <tdevries@suse.de>,
	 Simon Marchi <simark@simark.ca>
Subject: Re: [PATCH RFC] Require c++17 compiler
Date: Thu, 05 Oct 2023 09:55:55 -0600	[thread overview]
Message-ID: <87a5sxxdv8.fsf@tromey.com> (raw)
In-Reply-To: <ad73c9d5-f001-4592-bfb8-a518d15d6bc6@simark.ca> (Simon Marchi via Gdb-patches's message of "Thu, 5 Oct 2023 10:32:58 -0400")

>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> On 10/5/23 10:26, Lancelot SIX via Gdb-patches wrote:
>> If you take something like gdb::optional for example, it is used quite
>> extensively in the codebase, and I don't think it would be easy to
>> remove the it in favor of the standard C++ version any time soon.  We
>> can have gdb::optional be an alias to std::optional, but the codebase
>> will still continue to use "gdb::optional" independently of how this
>> is implemented.

Simon> Wouldn't it be a simple find and replace, gdb::optional to
Simon> std::optional?  Conveniently, it's the same number of characters, so it
Simon> doesn't even affect line-wrapping.

I wrote a patch to make gdb_optional.h check __cplusplus and use the
C++17 std::optional.  I had to comment out some of the test code to get
it to compile (warnings about set-but-unused variables), but other than
that it seems fine.  I'm running the test suite now.

Tom

  parent reply	other threads:[~2023-10-05 15:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05  6:54 [RFC] [gdb/build] " Tom de Vries
2023-10-05 10:33 ` [PATCH RFC] " Lancelot SIX
2023-10-05 12:26   ` Andrew Burgess
2023-10-05 14:26     ` Lancelot SIX
2023-10-05 14:32       ` Simon Marchi
2023-10-05 14:55         ` Lancelot SIX
2023-10-09 14:32           ` Andrew Burgess
2023-10-05 15:55         ` Tom Tromey [this message]
2023-10-12 17:30   ` Pedro Alves
2023-10-05 15:31 ` [RFC] [gdb/build] " Tom Tromey
2023-10-10 17:39   ` Tom Tromey
2023-10-10 19:16     ` Simon Marchi
2023-10-12 17:10 ` Pedro Alves
2023-10-12 17:22 ` Pedro Alves

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=87a5sxxdv8.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=Lancelot.Six@amd.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    --cc=tdevries@suse.de \
    /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).