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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Further reduced:

struct FunctionBridger
{
    template <typename T>
    FunctionBridger(T& func_)
    {
      T t(func_);
    }
};

struct Function : FunctionBridger
{
    template <typename Ty>
    Function( Ty&& func) : FunctionBridger(func) { }

    ~Function() {}
};

int main()
{
    Function func = 1;
}

Reply via email to