public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "n60wb42d2 at relay dot firefox.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/99631] decltype of non-type template-parameter shouldn't be const
Date: Tue, 09 Nov 2021 17:23:35 +0000	[thread overview]
Message-ID: <bug-99631-4-tykUwtO4OQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99631-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99631

n60wb42d2 at relay dot firefox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |n60wb42d2 at relay dot firefox.com

--- Comment #4 from n60wb42d2 at relay dot firefox.com ---
(In reply to Jonathan Wakely from comment #1)
> I'm not sure "rejects-valid" is appropriate, as it only fails to compile
> because of the static assert (i.e. you've asked for it).

Here it `rejects-valid`:

```c++
struct param{};

template<typename>
struct t;
template<>
struct t<param>{};

template<param... p>
auto test()
{
    (void)t<decltype(p)...>{};
}

int main()
{
    test<param{}>();
}
```
```
<source>:11:5: error: invalid use of incomplete type 'struct t<const param>'
   11 |     (void)t<decltype(p)...>{};
```

https://godbolt.org/z/MKxx1dobT

  parent reply	other threads:[~2021-11-09 17:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 17:38 [Bug c++/99631] New: " johelegp at gmail dot com
2021-03-18 13:20 ` [Bug c++/99631] " redi at gcc dot gnu.org
2021-03-18 13:48 ` jakub at gcc dot gnu.org
2021-03-18 23:44 ` johelegp at gmail dot com
2021-11-09 17:23 ` n60wb42d2 at relay dot firefox.com [this message]
2022-09-26  1:46 ` johelegp at gmail dot com
2022-09-26  1:47 ` johelegp at gmail dot com
2022-12-26 17:10 ` pinskia at gcc dot gnu.org
2023-09-15 17:38 ` ppalka at gcc dot gnu.org
2023-09-15 17:39 ` ppalka at gcc dot gnu.org
2023-09-15 17:41 ` ppalka at gcc dot gnu.org
2023-09-19 12:21 ` cvs-commit at gcc dot gnu.org
2023-09-24 18:42 ` cvs-commit at gcc dot gnu.org
2023-09-24 18:44 ` ppalka at gcc dot gnu.org
2023-09-24 19:13 ` danakj at orodu dot net

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=bug-99631-4-tykUwtO4OQ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).