public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Martin Sebor <msebor@gmail.com>
Cc: Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] document cp_operator_id and cp_assignment_operator_id
Date: Sat, 01 Jul 2017 21:42:00 -0000	[thread overview]
Message-ID: <CADzB+2nWrqY5x_AQ6dtcB-4EoKaCACwTTsVKe982tUNa7WgvDA@mail.gmail.com> (raw)
In-Reply-To: <76d44f1b-0c31-094b-1f2a-d8a8ecc9e32e@gmail.com>

OK.

On Thu, Jun 15, 2017 at 6:57 PM, Martin Sebor <msebor@gmail.com> wrote:
> On 06/15/2017 03:24 PM, Jason Merrill wrote:
>>
>> On Thu, Jun 15, 2017 at 12:57 PM, Martin Sebor <msebor@gmail.com> wrote:
>>>
>>> Attached is a documentation-only change to add comments explaining
>>> the C++ cp_operator_id and cp_assignment_operator_id macros.
>>
>>
>> Hmm, I'd say that these macros return the identifier used internally
>> to represent "operator OP" and "operator OP=", respectively.  Looking
>> up overloads is one thing you can do with that name, but the same is
>> true of all identifiers, do we need to mention it specifically?
>
>
> I tried to describe the use case that I needed but that wasn't
> obvious to me from the examples I cam across.
>
> If these cp_foo_id() helpers and the other identifier macros were
> defined and documented in one place there could be a few examples
> at the top of the section listing them showing some of the less
> obvious use cases.  As it is, cp_operator_id() and
> cp_assignment_operator_id() are defined in one place (and using
> the cp_foobar_id() naming convention), while the {ctor,dtor}_
> identifier macros in another (and using a different convention).
> Perhaps there's a good reason for it but knowing as little as
> I do I find it confusing because I used both to do the same
> thing: iterate over the overloads of the special functions.
>
> With that in mind, attached is an update that tries to clarify
> things without mentioning the example in the comments for (just)
> the operator _id macros.
>
> If you have a better suggestion I'll be happy to take it.
>
> Martin

      reply	other threads:[~2017-07-01 21:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-15 16:57 Martin Sebor
2017-06-15 21:25 ` Jason Merrill
2017-06-15 22:57   ` Martin Sebor
2017-07-01 21:42     ` Jason Merrill [this message]

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=CADzB+2nWrqY5x_AQ6dtcB-4EoKaCACwTTsVKe982tUNa7WgvDA@mail.gmail.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=msebor@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).