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

Reply via email to