This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36236] New: ICE with forwarding variadic function template in class template
- From: "mcalabrese_gp at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 May 2008 19:22:22 -0000
- Subject: [Bug c++/36236] New: ICE with forwarding variadic function template in class template
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following triggers an ICE when forwarded_foo is a template.
================================================================
#include <utility>
template< typename Type >
Type& lvalue_of();
char foo( int );
// Note: void is just a dummy type, any argument causes error.
template< typename = void >
class forwarded_foo
{
public:
template< typename ... Param >
decltype( foo( std::forward< Param >( lvalue_of< Param >() )... ) )
operator ()( Param&&... arg ) const;
};
int main()
{
forwarded_foo<> bar;
bar( 0 );
}
================================================================
../main.cpp: In instantiation of ?forwarded_foo<void>?:
../main.cpp:20: instantiated from here
../main.cpp:15: internal compiler error: in tsubst, at cp/pt.c:9421
--
Summary: ICE with forwarding variadic function template in class
template
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mcalabrese_gp at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36236