This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/64488] [4.9/5.0][c++11] Expand initializer list with lambdas in variadic template. Reject valid code.


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-01-04
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:

template <int... _is>
struct Expand
{
    static void (*const m_arr[sizeof...(_is)])();
};

template <int... _is>
void (*const Expand<_is...>::m_arr[])() = {
        [] () { (void)_is; } ...
};

int main()
{
    Expand<12,34,56> e;
    e.m_arr[0]();
    e.m_arr[1]();
    e.m_arr[2]();
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]