public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102933] New: Can't use CTAD in template argument
@ 2021-10-25 17:11 johelegp at gmail dot com
  2021-10-26 12:48 ` [Bug c++/102933] " ppalka at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: johelegp at gmail dot com @ 2021-10-25 17:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102933
           Summary: Can't use CTAD in template argument
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: johelegp at gmail dot com
                CC: johelegp at gmail dot com
  Target Milestone: ---

See https://godbolt.org/z/P8xq8h9M1.

```C++
template<class T> struct X { T t; };
template<X> void f();
template<class T> void g() {
  f<X{T{0}}>();
}
int main() {
  g<int>();
}
```

```
<source>: In function 'void g()':
<source>:7:5: error: invalid use of 'X<...auto...>' in template argument
    7 |   f<X{T{0}}>();
      |     ^
Compiler returned: 1
```

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-15 19:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 17:11 [Bug c++/102933] New: Can't use CTAD in template argument johelegp at gmail dot com
2021-10-26 12:48 ` [Bug c++/102933] " ppalka at gcc dot gnu.org
2021-10-28 14:46 ` cvs-commit at gcc dot gnu.org
2021-12-15 19:55 ` cvs-commit at gcc dot gnu.org
2021-12-15 19:55 ` ppalka at gcc dot gnu.org

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).