public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: "Tom Tromey" <tom@tromey.com>,
	"Alexandra Hájková" <ahajkova@redhat.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] remote.c: Make packet_check_result return a structure
Date: Tue, 09 Jan 2024 07:54:49 -0700	[thread overview]
Message-ID: <87mstev9om.fsf@tromey.com> (raw)
In-Reply-To: <87y1d3979r.fsf@redhat.com> (Andrew Burgess's message of "Fri, 05 Jan 2024 14:36:32 +0000")

>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:

Andrew>   https://en.cppreference.com/w/cpp/language/explicit

Andrew> And it seems that marking multi-argument constructors would place the
Andrew> same restrictions on the constructor as for single-argument
Andrew> constructors...

Andrew> Though I guess there's more chance of accidentally assigning a scalar
Andrew> into a non-scalar object (e.g. packet_result in this case).  Maybe
Andrew> that's why the single-argument case is being called out?

Yeah.  I think it just doesn't matter for multi-argument constructors
(that do not have default arguments), since there's no chance of
introducing an accidental implicit conversion -- multiple arguments are
needed.

Tom

  reply	other threads:[~2024-01-09 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-22 11:33 Alexandra Hájková
2023-12-22 15:32 ` Tom Tromey
2024-01-05 14:36   ` Andrew Burgess
2024-01-09 14:54     ` Tom Tromey [this message]
2023-12-26 15:39 ` Thiago Jung Bauermann

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=87mstev9om.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=aburgess@redhat.com \
    --cc=ahajkova@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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).