1// PR c++/14337 2 3template <bool> struct Constraint; 4template <> struct Constraint<true> { typedef int Result; }; 5 6template <typename T> 7struct IsInt { static const bool value = false; }; 8 9template <> 10struct IsInt<int> { static const bool value = true; }; 11 12template <typename T> 13typename Constraint<IsInt<T>::value>::Result foo(T); 14 15template <typename T> 16typename Constraint<!IsInt<T>::value>::Result foo(T); 17 18template <typename> 19void bar() { 20 foo(1); 21} 22