From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Pilar Latiesa <pilarlatiesa@gmail.com>
Cc: ppalka@redhat.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 18:01:56 +0100 [thread overview]
Message-ID: <CAH6eHdQAbZLZWVzzs40vNBK7xJOwQMxvNbBcVpQaLPjbWcypKA@mail.gmail.com> (raw)
In-Reply-To: <CAEwrC9aKcrf=Ve-Uvik2p11wixY5BMQWjtPN=1Dx2s1NxCOjOw@mail.gmail.com>
On Tue, 2 Apr 2024 at 18:00, Pilar Latiesa wrote:
>
> Just out of curiosity: would this also work?
>
> template<typename _Tp, typename _Disc>
> struct _Absent {};
>
> template<bool _Present, typename _Tp, typename _Disc = decltype([]{})>
> using __maybe_present_t = __conditional_t<_Present, _Tp, _Absent<_Tp, _Disc>>;
>
> That would avoid having to type 0, 1, ... manually.
This is subjectively horrible and, more objectively, would create
longer mangled names and additional RTTI.
next prev parent reply other threads:[~2024-04-02 17:02 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 [this message]
2024-04-02 17:18 ` Patrick Palka
2024-04-02 19:41 ` Pilar Latiesa
-- 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=CAH6eHdQAbZLZWVzzs40vNBK7xJOwQMxvNbBcVpQaLPjbWcypKA@mail.gmail.com \
--to=jwakely.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=pilarlatiesa@gmail.com \
--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).