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

--- Comment #5 from Oleksandr Koval <oleksandr.koval.dev at gmail dot com> ---
Right, my understanding is that it should generate hypothetical constructor
like:

```cpp
template <typename T>
struct C : public B<T> {
    C(B<T>);
};
```

and it doesn't work with braced-initializer list like in this example:

```cpp
template<typename T>
void test(B<T>){}

B{1};  // ok
test({1}); // error
```

So maybe it should not work by the current rules. I came up with this example
while reading https://wg21.link/P2582R1 (CTAD for inherited ctor-s) which makes
this possible:

```cpp
template<typename T>
struct S1{
    S1(T){}
};

template<typename T>
struct S2 : S1<T>{
    using S1<T>::S1;
};

S2{1};   // OK, deduced S2<int>
```

It's unfortunate that it doesn't work when we remove explicit constructors so
I'm trying to understand whether it's not allowed by current language rules or
just is not implemented by compilers.

Reply via email to