URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [decltype19.C] - Rev 378
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/42013
template<typename _Tp>
_Tp
__attribute ((const)) declval();
template<typename _Tp, typename _Up>
struct common_type
{
typedef __decltype(true ? declval<_Tp>() : declval<_Up>()) typet;
typedef __decltype(false ? declval<_Tp>() : declval<_Up>()) typef;
};
template<typename, typename> struct is_same;
template<typename _Tp> struct is_same<_Tp, _Tp> { typedef _Tp type; };
void f()
{
typedef common_type<int, const int>::typet typet;
typedef common_type<int, const int>::typef typef;
typedef is_same<typet, typef>::type type;
}
Go to most recent revision | Compare with Previous | Blame | View Log