This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/47125] [4.5/4.6 Regression] ICE occurs in combination with partial specialization and invalid template function.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47125

--- Comment #6 from Kohei Takahashi <flast at flast dot jp> 2011-03-30 00:12:12 UTC ---
It works good now. However GCC shows following error message.
----
testcase.cpp: In function 'void g()':
testcase.cpp:17:10: error: no matching function for call to 'f(int)'
testcase.cpp:17:10: note: candidate is:
testcase.cpp:12:8: note: template<class T> class enable_if<true, T>::type f(T)

I think error message like followings is better.
----
testcase.cpp:11:1: error: need 'typename' before 'enable_if<true, T>::type'
because 'enable_if<true, T>' is a dependent scope
testcase.cpp: In function 'void g()':
testcase.cpp:17:10: error: 'f' was not declared in this scope


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]