From: Pilar Latiesa <pilarlatiesa@gmail.com>
To: 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:59:32 +0200 [thread overview]
Message-ID: <CAEwrC9aKcrf=Ve-Uvik2p11wixY5BMQWjtPN=1Dx2s1NxCOjOw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
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.
next reply other threads:[~2024-04-02 16:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 16:59 Pilar Latiesa [this message]
2024-04-02 17:01 ` Jonathan Wakely
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='CAEwrC9aKcrf=Ve-Uvik2p11wixY5BMQWjtPN=1Dx2s1NxCOjOw@mail.gmail.com' \
--to=pilarlatiesa@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--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).