From: Jonathan Wakely <jwakely@redhat.com>
To: Antony Polukhin <antoshkka@gmail.com>
Cc: libstdc++ <libstdc++@gcc.gnu.org>,
gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] PR libstdc++/89728 diagnose some missuses of [locale.convenience] functions
Date: Wed, 12 May 2021 10:18:33 +0100 [thread overview]
Message-ID: <20210512091833.GA3008@redhat.com> (raw)
In-Reply-To: <20210511200031.GZ3008@redhat.com>
On 11/05/21 21:00 +0100, Jonathan Wakely wrote:
>Alternatively, would it be even simpler to just define a partial
>specialization of ctype?
>
>template<typename _CharT, typename _Traits, typename _Alloc>
> class ctype<basic_string<_CharT, _Traits, _Alloc> >
> {
>#if __cplusplus >= 201103L
> static_assert(something dependent,
> "std::basic_string used as a character type");
>#endif
> private:
> ctype();
> ~ctype();
> };
>
>This will work in C++98 too.
Or just leave it undefined, as libc++ seems to do according to your
comment in PR 89728:
error: implicit instantiation of undefined template 'std::__1::ctype<std::__1::basic_string<char> >'
Was your aim to have a static_assert that gives a more descriptive
error? We could leave it undefined in C++98 and have the static assert
for C++11 and up.
next prev parent reply other threads:[~2021-05-12 9:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 18:27 Antony Polukhin
2021-05-11 20:00 ` Jonathan Wakely
2021-05-12 9:18 ` Jonathan Wakely [this message]
2021-05-12 9:58 ` Antony Polukhin
2021-05-12 12:35 ` Antony Polukhin
2021-05-12 14:44 ` Jonathan Wakely
2021-05-12 15:38 ` Antony Polukhin
2021-05-12 15:51 ` Antony Polukhin
2021-05-12 16:16 ` Jonathan Wakely
2021-05-17 17:14 ` Jonathan Wakely
2021-06-01 18:04 ` 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=20210512091833.GA3008@redhat.com \
--to=jwakely@redhat.com \
--cc=antoshkka@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/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).