http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60305
Bug ID: 60305
Summary: ICE constexpr array of functions in template
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: trashyankes at wp dot pl
-->8---->8---->8---->8---->8--
template<int Y>
int F() { return Y; }
template<int... I>
void func(int i)
{
//internal compiler error: in type_dependent_expression_p, at cp/pt.c:19969
constexpr int (*Func[])() = { F<I>... };
return Func[i]();
}
-->8---->8---->8---->8---->8--
without constexpr its compile without error.