http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52224
--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com>
2012-02-13 09:26:34 UTC ---
I condensed the test case further down to the following:
//---
template<bool, class> struct enable_if {};
template<class T> struct enable_if<true, T> { typedef T type; };
template <typename T> struct is_mine { enum { value = false }; };
template <typename E1, typename E2>
struct either_is_mine { static const bool value = is_mine<E1>::value ||
is_mine<E2>::value; };
template <typename E1, typename E2>
typename enable_if<either_is_mine<E1, E2>::value, int>::type
operator||(E1 e1, E2 e2);
template <typename E1, typename E2>
typename enable_if<either_is_mine<E1, E2>::value, int>::type
test(E1 e1, E2 e2);
const int n = sizeof(test(1, 2));
//---