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

Max <max.kan...@nu-cost.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |max.kan...@nu-cost.com

--- Comment #4 from Max <max.kan...@nu-cost.com> ---
Not sure whether it helps, but here is a version of the same ICE without the
struct having a member, see https://godbolt.org/z/4xjbcToxj

================================
#include <variant>

template<typename T>
struct A {};

template<typename T>
using Var = std::variant<A<T>>;

int main() {
    auto var = Var{};
}
================================

Here the compiler can clearly not deduce the type, so this is invalid code.
Adding the type leads to valid code which is compiled as expected.

Reply via email to