public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101344] New: braced-init-list not supported in an aggregate deduction
@ 2021-07-06 16:24 fchelnokov at gmail dot com
  2021-07-12 11:02 ` [Bug c++/101344] " redi at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: fchelnokov at gmail dot com @ 2021-07-06 16:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101344
           Summary: braced-init-list not supported in an aggregate
                    deduction
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

Please consider the program as follows. GCC correctly initializes struct A, but
in more simple case of struct B it fails:

```
template<typename T, int N>
struct A { T t[N]; };

template<typename T>
struct B { T t[2]; };

int main()
{
   A a{{1, 2}}; // ok in gcc
   B b{{1, 2}}; // error in gcc (ok in other compilers, e.g. msvc)
   return a.t[0];
}
```

I believe, struct B initialization shall work here same way.

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

end of thread, other threads:[~2021-10-07  6:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 16:24 [Bug c++/101344] New: braced-init-list not supported in an aggregate deduction fchelnokov at gmail dot com
2021-07-12 11:02 ` [Bug c++/101344] " redi at gcc dot gnu.org
2021-08-12 15:20 ` ppalka at gcc dot gnu.org
2021-08-12 15:27 ` [Bug c++/101344] [11/12 Regression] " ppalka at gcc dot gnu.org
2021-08-18 12:39 ` cvs-commit at gcc dot gnu.org
2021-08-18 12:51 ` ppalka at gcc dot gnu.org
2021-09-19 23:17 ` pinskia at gcc dot gnu.org
2021-10-06 14:15 ` cvs-commit at gcc dot gnu.org
2021-10-06 14:18 ` ppalka at gcc dot gnu.org
2021-10-07  6:55 ` fchelnokov at gmail dot com

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