https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109683
Ali Mohammad Pur Fard <ali.mpfard at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ali.mpfard at gmail dot com
--- Comment #1 from Ali Mohammad Pur Fard <ali.mpfard at gmail dot com> ---
As a note, using a type alias for `T` in the constraint seems to work around
the issue:
```
template <typename T, typename>
struct VariantConstructors {
using U = T;
VariantConstructors(T&& t)
requires(requires { U(t); });
};
// Everything below is the same as the repro case
template <typename... Ts>
struct InheritFromEntries : Ts... {};
template <typename... Ps>
struct InheritFromPack: InheritFromEntries<Ps>... {
using InheritFromEntries<Ps>::InheritFromEntries...;
};
template <typename... Ts>
struct Variant : InheritFromPack<VariantConstructors<Ts, Variant<Ts...>>...>
{};
template <typename T>
class Outer;
struct Inner {
Inner(Outer<int>);
};
template<typename T>
class Outer {
Variant<T, Inner> value_;
};
struct Empty {};
void fn(Outer<Empty> x) {}
```
(https://godbolt.org/z/1GTrjcvG6)