[Bug c++/49932] New: [C++0x] ICE on instantiating decltype(expr)::type with template
flast at flast dot jp
gcc-bugzilla@gcc.gnu.org
Mon Aug 1 13:17:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49932
Summary: [C++0x] ICE on instantiating decltype(expr)::type with
template
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: flast@flast.jp
ICE on instantiating the following two template functions.
I tested with GCC 4.7.0 20110801.
---- 8< ----
template < typename T >
auto
f1( T x ) // ICE on here
-> typename decltype( x )::type {}
template < typename T >
typename decltype( T{} )::type
f2( T x ) {} // ICE on here
struct S { typedef void type; };
void g()
{
f1( S() );
f2( S() );
}
---- 8< ----
More information about the Gcc-bugs
mailing list