// PR c++/42013 template _Tp __attribute ((const)) declval(); template struct common_type { typedef __decltype(true ? declval<_Tp>() : declval<_Up>()) typet; typedef __decltype(false ? declval<_Tp>() : declval<_Up>()) typef; }; template struct is_same; template struct is_same<_Tp, _Tp> { typedef _Tp type; }; void f() { typedef common_type::typet typet; typedef common_type::typef typef; typedef is_same::type type; }