[Bug c++/55580] New: internal compiler error: Segmentation fault - with variadic template parameter
arturswiderski82 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Dec 3 21:13:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55580
Bug #: 55580
Summary: internal compiler error: Segmentation fault - with
variadic template parameter
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: arturswiderski82@gmail.com
Created attachment 28865
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28865
main.cpp to reproduce bug
Code( I belive valid one ) listed below crashes compiler
I compile it with g++ -c -std=c++11 main.cpp
template < int const _speed >
struct ConstValue
{
static int const Value = _speed;
};
template< typename ... _Rest >
struct Features
{
typedef ConstValue< 0 > Average;
};
template< typename ... _Rest >
template< int const _speed >
struct Features< ConstValue< _speed >, _Rest ... >
{
typedef ConstValue< 2 > Average;
};
int main ()
{
Features< ConstValue< 2 >, ConstValue< 2 > >::Average Oki;
return 0;
}
More information about the Gcc-bugs
mailing list