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

Matthias Kretz <kretz at kde dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kretz at kde dot org

--- Comment #10 from Matthias Kretz <kretz at kde dot org> ---
I have the following in my code now:

    // this could be much simpler:
    //
    // return {V([&](auto i) { return x[i + Indexes * V::size()]; })...};       
    //
    // Sadly GCC has a bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47226.
The                                                     
    // following works around it by placing the pack outside of the code block
of the                                                 
    // lambda:                                                                  
    return {[](size_t j, const datapar<T, A> &y) {                              
        return V([&](auto i) { return y[i + j * V::size()]; });                 
    }(Indexes, x)...};

Reply via email to