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++/70971] ICE in parameter pack expansion


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

Martin LiÅka <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-06-29
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin LiÅka <marxin at gcc dot gnu.org> ---
ICEs from GCC 5.1.0 on all releases (including current trunk).

This is a bit reduced test-case:

#include <memory>
struct A {};
template <class...> struct typelist {};
template <class... Cs> std::unique_ptr<A> chooseB(typelist<Cs...>);
template <class... Cs, class Idx, class... Rest>
std::unique_ptr<A> chooseB(typelist<Cs...> choices, Idx, Rest... rest) {
  auto f = [=](auto) { return [=] { return chooseB(choices, rest...); }; };
  std::function<std::unique_ptr<A>()> fs[]{f(Cs{})...};
}
main() { chooseB(typelist<double, char>{}, 0, 1, 2); }

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