public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109935] New: CTAD for an aggregate with a dependent base class doesn't work
@ 2023-05-22 19:55 oleksandr.koval.dev at gmail dot com
  2023-05-22 19:59 ` [Bug c++/109935] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: oleksandr.koval.dev at gmail dot com @ 2023-05-22 19:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109935
           Summary: CTAD for an aggregate with a dependent base class
                    doesn't work
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: oleksandr.koval.dev at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/s9cM719n3

```cpp
template <typename T>
struct B {
    T x;
};

template <typename T>
struct C : public B<T> {
};

void f(){
    B{1};   // works as expected
    C{{1}}; // error
}
```

Not 100% sure about it but I see no reason for `C{{1}}` not to work. Extra set
of braces is required because B<T> is a dependent base class and brace elision
doesn't work for it (https://eel.is/c++draft/over.match.class.deduct#1.5.1).

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

end of thread, other threads:[~2023-05-23 10:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22 19:55 [Bug c++/109935] New: CTAD for an aggregate with a dependent base class doesn't work oleksandr.koval.dev at gmail dot com
2023-05-22 19:59 ` [Bug c++/109935] " pinskia at gcc dot gnu.org
2023-05-22 20:02 ` oleksandr.koval.dev at gmail dot com
2023-05-22 20:40 ` pinskia at gcc dot gnu.org
2023-05-22 20:41 ` pinskia at gcc dot gnu.org
2023-05-23 10:30 ` oleksandr.koval.dev 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).