1 template<class T, class U> 2 struct UnaryReturn { 3 typedef T Type_t; 4 }; 5 6 struct foo 7 { 8 template <class T> 9 typename UnaryReturn<T, int>::Type_t 10 bar(); 11 }; 12 13 template<class T> 14 struct UnaryReturn<T, int> { 15 typedef bool Type_t; 16 }; 17 18