This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49823] New: [C++0x] ICE on decltype(expr)::type with template
- From: "flast at flast dot jp" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 23 Jul 2011 15:38:11 +0000
- Subject: [Bug c++/49823] New: [C++0x] ICE on decltype(expr)::type with template
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49823
Summary: [C++0x] ICE on 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
All of following three template functions occur ICE with GCC 4.7.0 20110723.
----8<----
template < typename T >
auto f( const T &x )
-> typename decltype( x )::type; // ICE on here
template < typename T >
typename decltype( T{} )::type // ICE on here
f( T );
template < typename T >
void f( T x )
{ typename decltype( x )::type x; } // ICE on here
----8<----