http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53039
--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-20 12:37:33 UTC --- So, the below is my final pure C++ testcase: if 1 is changed to 0 the code compiles; likewise if 1 and 0 are swapped. Thus, it seems there is something wrong in global front-end data structures: template <class, class> struct is_convertible { static const bool value = true; }; template<bool, class T> struct enable_if { typedef T type; }; template <bool...> struct Xs { static const bool value = true; }; #if 1 template<typename... Ts> class BType { template <typename... Us, typename enable_if< Xs<is_convertible<Us, Ts>::value...>::value, bool>::type = false> void fooX(Us&&...); }; #endif template <typename... Ts> struct AType { template <typename... Us, typename enable_if< Xs<is_convertible<Us, Ts>::value...>::value, bool>::type = false> void foo(Us&&...); }; #if 0 template<typename... Ts> class CType { template <typename... Us, typename enable_if< Xs<is_convertible<Us, Ts>::value...>::value, bool>::type = false> void fooX(Us&&...); }; #endif int main() { AType<int, int> t; t.foo(1, 1); }