public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Pilar Latiesa <pilarlatiesa@gmail.com>
To: Patrick Palka <ppalka@redhat.com>
Cc: Jonathan Wakely <jwakely.gcc@gmail.com>,
	libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libstdc++: Allow adjacent __maybe_present_t<false, ...> to overlap
Date: Tue, 2 Apr 2024 21:41:45 +0200	[thread overview]
Message-ID: <CAEwrC9bGAwMRkko5HL5CWXTKV8m=6a4oKPR1fWeGU0ts13Es8Q@mail.gmail.com> (raw)
In-Reply-To: <5db417d9-52e9-e701-2644-5802148e8339@idea>

> > This is subjectively horrible and, more objectively, would create
> > longer mangled names and additional RTTI.

> Yeah, it's a neat trick but probably not appropriate to use within the
> standard library.

I understand. I was genuinely curious about whether this would do the trick.

In fact, if I'm not mistaken, the whole thing could be simplified to:

template<bool _Present, typename _Tp, typename _Absent = decltype([]{})>
using __maybe_present_t = __conditional_t<_Present, _Tp, _Absent>;

  reply	other threads:[~2024-04-02 19:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 16:59 Pilar Latiesa
2024-04-02 17:01 ` Jonathan Wakely
2024-04-02 17:18   ` Patrick Palka
2024-04-02 19:41     ` Pilar Latiesa [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-01 22:15 Patrick Palka
2024-04-02  9:17 ` 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:
  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='CAEwrC9bGAwMRkko5HL5CWXTKV8m=6a4oKPR1fWeGU0ts13Es8Q@mail.gmail.com' \
    --to=pilarlatiesa@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=ppalka@redhat.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).