public inbox for
 help / color / mirror / Atom feed
From: Jonathan Wakely <>
To: Varun Kumar E <>
Cc: "libstdc++" <>
Subject: Re: RTTI names for classes in anonymous namespaces.
Date: Wed, 23 Aug 2023 09:48:48 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

On Wed, 23 Aug 2023, 09:19 Varun Kumar E via Libstdc++, <> wrote:

>  hello all,
>       The RTTI names generated by gcc for classes in anonymous namespaces
> begin with the prefix asterisk(*).

      Could you please explain the reasoning behind this?

It means that type_info equality can be determined by just comparing the
const char* pointers, instead of using strcmp to match equal names.

The pointer value will be unique, so will only compare equal to itself.

As Itanium ABI
> c++ has no mention of this.

The Itanium ABI doesn't dictate the form of those strings.

When you call std::type_info::name() the '*' is not in the result. It's
just an implementation detail.

  reply	other threads:[~2023-08-23  8:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23  8:19 Varun Kumar E
2023-08-23  8:48 ` Jonathan Wakely [this message]
2023-08-23  8:40 Varun Kumar E
2023-08-23  8:54 ` Jonathan Wakely
2023-08-23  8:59   ` Jonathan Wakely

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:

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

  git send-email \
    --in-reply-to='' \ \ \ \

* 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).