[Bug c++/109935] CTAD for an aggregate with a dependent base class doesn't work

2023-05-23 Thread oleksandr.koval.dev at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109935 --- Comment #5 from Oleksandr Koval --- Right, my understanding is that it should generate hypothetical constructor like: ```cpp template struct C : public B { C(B); }; ``` and it doesn't work with braced-initializer list like in this

[Bug c++/109935] CTAD for an aggregate with a dependent base class doesn't work

2023-05-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109935 --- Comment #4 from Andrew Pinski --- The same is true even with a depedent field rather than base: ``` template struct C { B b; }; ```

[Bug c++/109935] CTAD for an aggregate with a dependent base class doesn't work

2023-05-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109935 --- Comment #3 from Andrew Pinski --- C{B{1}}; Does work though. I suspect the issue is cannot figure out that {1} can be bound to B and deudce T there and even GCC gives that as a reason: :7:8: note: candidate: 'template C(B)-> C' 7 |

[Bug c++/109935] CTAD for an aggregate with a dependent base class doesn't work

2023-05-22 Thread oleksandr.koval.dev at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109935 --- Comment #2 from Oleksandr Koval --- According to cppreference, Clang has not implemented CTAD for aggregates at all so no surprise here. I know that gcc/msvc rejects it but I don't understand why.

[Bug c++/109935] CTAD for an aggregate with a dependent base class doesn't work

2023-05-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109935 --- Comment #1 from Andrew Pinski --- MSVC rejects `C{{1}}` for the same reason as GCC. clang rejects even `B{1}` .